tunused_imports.nim 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. discard """
  2. cmd: '''nim c --hint:Processing:off $file'''
  3. nimout: '''
  4. tunused_imports.nim(15, 10) Warning: BEGIN [User]
  5. tunused_imports.nim(43, 10) Warning: END [User]
  6. tunused_imports.nim(38, 8) Warning: imported and not used: 'strutils' [UnusedImport]
  7. tunused_imports.nim(39, 13) Warning: imported and not used: 'strtabs' [UnusedImport]
  8. tunused_imports.nim(39, 22) Warning: imported and not used: 'cstrutils' [UnusedImport]
  9. tunused_imports.nim(40, 12) Warning: imported and not used: 'macrocache' [UnusedImport]
  10. tunused_imports.nim(41, 25) Warning: imported and not used: 'basics' [UnusedImport]
  11. '''
  12. action: "compile"
  13. """
  14. {.warning: "BEGIN".}
  15. # bug #12885
  16. import tables, second
  17. template test(key: int): untyped =
  18. `[]`(dataEx, key)
  19. echo test(1)
  20. import net, dontmentionme
  21. echo AF_UNIX
  22. import macros
  23. # bug #11809
  24. macro bar(): untyped =
  25. template baz() = discard
  26. result = getAst(baz())
  27. bar()
  28. import strutils
  29. import std/[strtabs, cstrutils]
  30. import std/macrocache
  31. import std/strbasics as basics
  32. {.warning: "END".}