fixes #11809
This commit is contained in:
parent
e3c0bf48c5
commit
04708742e7
5 changed files with 76 additions and 27 deletions
27
tests/tools/tunused_imports.nim
Normal file
27
tests/tools/tunused_imports.nim
Normal file
|
|
@ -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".}
|
||||
Loading…
Add table
Add a link
Reference in a new issue