diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-08-08 21:41:05 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-08 21:41:05 +0200 |
commit | 04708742e7ccf7936f2fb5c97ef7d28016673caf (patch) | |
tree | f40e91ac5d799337f17564969a0d303b57a068bc /tests/tools | |
parent | e3c0bf48c521515cfda8cfddae2df038164b5893 (diff) | |
download | Nim-04708742e7ccf7936f2fb5c97ef7d28016673caf.tar.gz |
fixes #11809
Diffstat (limited to 'tests/tools')
-rw-r--r-- | tests/tools/tunused_imports.nim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/tools/tunused_imports.nim b/tests/tools/tunused_imports.nim new file mode 100644 index 000000000..c9cfcfe90 --- /dev/null +++ b/tests/tools/tunused_imports.nim @@ -0,0 +1,27 @@ +discard """ + cmd: '''nim c --hint[Processing]:off $file''' + nimout: ''' +tunused_imports.nim(11, 10) Warning: BEGIN [User] +tunused_imports.nim(27, 10) Warning: END [User] +tunused_imports.nim(25, 8) Warning: imported and not used: 'strutils' [UnusedImport] +''' + action: "compile" +""" + +{.warning: "BEGIN".} + +import net + +echo AF_UNIX + +import macros +# bug #11809 +macro bar(): untyped = + template baz() = discard + result = getAst(baz()) + +bar() + +import strutils + +{.warning: "END".} |