diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-12-13 19:20:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-13 19:20:29 +0100 |
commit | 347a04606bddbb49f05e86188d96889617ce5136 (patch) | |
tree | ef5218ef5dc2234d269d83ab0a1dec28f5049ffc /tests/tools | |
parent | a0aa8fa857b5bd6db4395ca62e2b4618f6876873 (diff) | |
download | Nim-347a04606bddbb49f05e86188d96889617ce5136.tar.gz |
fixes #12885 [backport] (#12895)
Diffstat (limited to 'tests/tools')
-rw-r--r-- | tests/tools/second.nim | 3 | ||||
-rw-r--r-- | tests/tools/tunused_imports.nim | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/tools/second.nim b/tests/tools/second.nim new file mode 100644 index 000000000..0dbe72adb --- /dev/null +++ b/tests/tools/second.nim @@ -0,0 +1,3 @@ +import tables + +let dataEx* = {1: 2, 3: 4}.toTable diff --git a/tests/tools/tunused_imports.nim b/tests/tools/tunused_imports.nim index 1c5732c83..bce906634 100644 --- a/tests/tools/tunused_imports.nim +++ b/tests/tools/tunused_imports.nim @@ -2,14 +2,23 @@ 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] +tunused_imports.nim(36, 10) Warning: END [User] +tunused_imports.nim(34, 8) Warning: imported and not used: 'strutils' [UnusedImport] ''' action: "compile" """ {.warning: "BEGIN".} +# bug #12885 + +import tables, second + +template test(key: int): untyped = + `[]`(dataEx, key) + +echo test(1) + import net, dontmentionme echo AF_UNIX |