treportunused.nim 1.2 KB

123456789101112131415161718192021222324252627282930
  1. discard """
  2. nimout: '''
  3. treportunused.nim(19, 10) Hint: 's1' is declared but not used [XDeclaredButNotUsed]
  4. treportunused.nim(26, 5) Hint: 's8' is declared but not used [XDeclaredButNotUsed]
  5. treportunused.nim(22, 6) Hint: 's4' is declared but not used [XDeclaredButNotUsed]
  6. treportunused.nim(25, 7) Hint: 's7' is declared but not used [XDeclaredButNotUsed]
  7. treportunused.nim(24, 7) Hint: 's6' is declared but not used [XDeclaredButNotUsed]
  8. treportunused.nim(23, 6) Hint: 's5' is declared but not used [XDeclaredButNotUsed]
  9. treportunused.nim(20, 10) Hint: 's2' is declared but not used [XDeclaredButNotUsed]
  10. treportunused.nim(29, 6) Hint: 's11' is declared but not used [XDeclaredButNotUsed]
  11. treportunused.nim(27, 5) Hint: 's9' is declared but not used [XDeclaredButNotUsed]
  12. treportunused.nim(21, 10) Hint: 's3' is declared but not used [XDeclaredButNotUsed]
  13. treportunused.nim(28, 6) Hint: 's10' is declared but not used [XDeclaredButNotUsed]
  14. '''
  15. action: compile
  16. """
  17. # bug #9764
  18. iterator s1(a:string): int = discard
  19. iterator s2(): int = discard
  20. template s3(): untyped = 123
  21. proc s4(): int = 123
  22. proc s5[T](a: T): int = 123
  23. macro s6(a: int): untyped = discard
  24. const s7 = 0
  25. let s8 = 0
  26. var s9: int
  27. type s10 = object
  28. type s11 = type(1.2)