tunused_imports.nim 601 B

12345678910111213141516171819202122232425262728293031323334353637
  1. discard """
  2. cmd: '''nim c --hint:Processing:off $file'''
  3. nimout: '''
  4. tunused_imports.nim(11, 10) Warning: BEGIN [User]
  5. tunused_imports.nim(36, 10) Warning: END [User]
  6. tunused_imports.nim(34, 8) Warning: imported and not used: 'strutils' [UnusedImport]
  7. '''
  8. action: "compile"
  9. """
  10. {.warning: "BEGIN".}
  11. # bug #12885
  12. import tables, second
  13. template test(key: int): untyped =
  14. `[]`(dataEx, key)
  15. echo test(1)
  16. import net, dontmentionme
  17. echo AF_UNIX
  18. import macros
  19. # bug #11809
  20. macro bar(): untyped =
  21. template baz() = discard
  22. result = getAst(baz())
  23. bar()
  24. import strutils
  25. {.warning: "END".}