tobjectdeclfield.nim 327 B

12345678910111213141516171819202122
  1. block: # issue #16005
  2. var x = 0
  3. block:
  4. type Foo = object
  5. x: float # ok
  6. template main() =
  7. block:
  8. type Foo = object
  9. x: float # Error: cannot use symbol of kind 'var' as a 'field'
  10. main()
  11. block: # issue #19552
  12. template test =
  13. type
  14. test2 = ref object
  15. reset: int
  16. test()