diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-08-21 15:07:44 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-21 15:07:44 +0200 |
commit | cf20c4460c5b495a97b3f1f1d091f77832b89384 (patch) | |
tree | 3b47a9728d6acbce68ca360ffe203f05f0074914 /tests/deprecated/tmodule1.nim | |
parent | bbe5e8326b9f307e857b28d4b27fe9b1ec6a08c0 (diff) | |
download | Nim-cf20c4460c5b495a97b3f1f1d091f77832b89384.tar.gz |
More robust handling of deprecated pragmas (#8696)
Prevent `deprecated` annotations to "slip" up to the parent module and warn about unsupported annotations. Accidentally fixes #7867
Diffstat (limited to 'tests/deprecated/tmodule1.nim')
-rw-r--r-- | tests/deprecated/tmodule1.nim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/deprecated/tmodule1.nim b/tests/deprecated/tmodule1.nim new file mode 100644 index 000000000..954836889 --- /dev/null +++ b/tests/deprecated/tmodule1.nim @@ -0,0 +1,23 @@ +discard """ + nimout: '''tmodule1.nim(11, 8) Warning: goodbye; importme is deprecated [Deprecated] +tmodule1.nim(14, 10) Warning: Ty is deprecated [Deprecated] +tmodule1.nim(17, 10) Warning: hello; Ty1 is deprecated [Deprecated] +tmodule1.nim(20, 8) Warning: aVar is deprecated [Deprecated] +tmodule1.nim(22, 3) Warning: aProc is deprecated [Deprecated] +tmodule1.nim(23, 3) Warning: hello; aProc1 is deprecated [Deprecated] +''' +""" + +import importme + +block: + var z: Ty + z = 0 +block: + var z: Ty1 + z = 0 +block: + echo aVar +block: + aProc() + aProc1() |