tmetaobjectfields.nim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. discard """
  2. cmd: "nim check --hints:off $file"
  3. action: "reject"
  4. nimout: '''
  5. tmetaobjectfields.nim(24, 5) Error: 'array' is not a concrete type
  6. tmetaobjectfields.nim(28, 5) Error: 'seq' is not a concrete type
  7. tmetaobjectfields.nim(32, 5) Error: 'set' is not a concrete type
  8. tmetaobjectfields.nim(35, 3) Error: 'sink' is not a concrete type
  9. tmetaobjectfields.nim(37, 3) Error: 'lent' is not a concrete type
  10. tmetaobjectfields.nim(54, 16) Error: 'seq' is not a concrete type
  11. tmetaobjectfields.nim(58, 5) Error: 'ptr' is not a concrete type
  12. tmetaobjectfields.nim(59, 5) Error: 'ref' is not a concrete type
  13. tmetaobjectfields.nim(60, 5) Error: 'auto' is not a concrete type
  14. tmetaobjectfields.nim(61, 5) Error: 'UncheckedArray' is not a concrete type
  15. '''
  16. """
  17. # bug #6982
  18. # bug #19546
  19. # bug #23531
  20. type
  21. ExampleObj1 = object
  22. arr: array
  23. type
  24. ExampleObj2 = object
  25. arr: seq
  26. type
  27. ExampleObj3 = object
  28. arr: set
  29. type A = object
  30. b: sink
  31. # a: openarray
  32. c: lent
  33. type PropertyKind = enum
  34. tInt,
  35. tFloat,
  36. tBool,
  37. tString,
  38. tArray
  39. type
  40. Property = ref PropertyObj
  41. PropertyObj = object
  42. case kind: PropertyKind
  43. of tInt: intValue: int
  44. of tFloat: floatValue: float
  45. of tBool: boolValue: bool
  46. of tString: stringValue: string
  47. of tArray: arrayValue: seq
  48. type
  49. RegressionTest = object
  50. a: ptr
  51. b: ref
  52. c: auto
  53. d: UncheckedArray