tdeprecated2.nim 629 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. discard """
  2. nimout: '''
  3. tdeprecated2.nim(23, 3) Warning: a is deprecated [Deprecated]
  4. tdeprecated2.nim(30, 11) Warning: asdf; enum 'Foo' which contains field 'a' is deprecated [Deprecated]
  5. tdeprecated2.nim(40, 16) Warning: use fooX instead; fooA is deprecated [Deprecated]
  6. end
  7. '''
  8. """
  9. ## line 15
  10. block:
  11. var
  12. a {.deprecated.}: array[0..11, int]
  13. a[8] = 1
  14. block t10111:
  15. type
  16. Foo {.deprecated: "asdf" .} = enum
  17. a
  18. var _ = a
  19. block: # issue #8063
  20. type
  21. Foo = enum
  22. fooX
  23. const fooA {.deprecated: "use fooX instead".} = fooX
  24. let
  25. foo: Foo = fooA
  26. echo foo
  27. static: echo "end"