tdeprecated1.nim 510 B

12345678910111213141516
  1. let foo* {.deprecated: "abcd".} = 42
  2. var foo1* {.deprecated: "efgh".} = 42
  3. foo1 = foo #[tt.Warning
  4. ^ efgh; foo1 is deprecated [Deprecated]; tt.Warning
  5. ^ abcd; foo is deprecated [Deprecated]]#
  6. proc hello[T](a: T) {.deprecated: "Deprecated since v1.2.0, use 'HelloZ'".} =
  7. discard
  8. hello[int](12) #[tt.Warning
  9. ^ Deprecated since v1.2.0, use 'HelloZ'; hello is deprecated [Deprecated]]#
  10. const foo2* {.deprecated: "abcd".} = 42
  11. discard foo2 #[tt.Warning
  12. ^ abcd; foo2 is deprecated [Deprecated]]#