tmetaobjectfields.nim 1.6 KB

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