From fb26b95f815b5426e0a8aad98ca0ff018ef1f4db Mon Sep 17 00:00:00 2001 From: Neelesh Chandola Date: Wed, 9 Jan 2019 00:14:47 +0530 Subject: {.deprecated: msg.} now works for vars and lets (#10234) --- tests/deprecated/tannot.nim | 9 +++++++++ tests/deprecated/tnoannot.nim | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 tests/deprecated/tannot.nim delete mode 100644 tests/deprecated/tnoannot.nim (limited to 'tests/deprecated') diff --git a/tests/deprecated/tannot.nim b/tests/deprecated/tannot.nim new file mode 100644 index 000000000..d14f6cc23 --- /dev/null +++ b/tests/deprecated/tannot.nim @@ -0,0 +1,9 @@ +discard """ + nimout: '''tannot.nim(9, 1) Warning: efgh; foo1 is deprecated [Deprecated] +tannot.nim(9, 8) Warning: abcd; foo is deprecated [Deprecated] +''' +""" + +let foo* {.deprecated: "abcd".} = 42 +var foo1* {.deprecated: "efgh".} = 42 +foo1 = foo diff --git a/tests/deprecated/tnoannot.nim b/tests/deprecated/tnoannot.nim deleted file mode 100644 index ac168952e..000000000 --- a/tests/deprecated/tnoannot.nim +++ /dev/null @@ -1,7 +0,0 @@ -discard """ - errormsg: "annotation to deprecated not supported here" - line: 7 -""" - -var foo* {.deprecated.} = 42 -var foo1* {.deprecated: "no".} = 42 -- cgit 1.4.1-2-gfad0