tspellsuggest.nim 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. discard """
  2. # pending bug #16521 (bug 12) use `matrix`
  3. cmd: "nim c --spellsuggest:15 --hints:off $file"
  4. action: "reject"
  5. nimout: '''
  6. tspellsuggest.nim(45, 13) Error: undeclared identifier: 'fooBar'
  7. candidates (edit distance, scope distance); see '--spellSuggest':
  8. (1, 0): 'fooBar8' [var declared in tspellsuggest.nim(43, 9)]
  9. (1, 1): 'fooBar7' [var declared in tspellsuggest.nim(41, 7)]
  10. (1, 3): 'fooBar1' [var declared in tspellsuggest.nim(33, 5)]
  11. (1, 3): 'fooBar2' [let declared in tspellsuggest.nim(34, 5)]
  12. (1, 3): 'fooBar3' [const declared in tspellsuggest.nim(35, 7)]
  13. (1, 3): 'fooBar4' [proc declared in tspellsuggest.nim(36, 6)]
  14. (1, 3): 'fooBar5' [template declared in tspellsuggest.nim(37, 10)]
  15. (1, 3): 'fooBar6' [macro declared in tspellsuggest.nim(38, 7)]
  16. (1, 5): 'FooBar' [type declared in mspellsuggest.nim(5, 6)]
  17. (1, 5): 'fooBar4' [proc declared in mspellsuggest.nim(1, 6)]
  18. (1, 5): 'fooBar9' [var declared in mspellsuggest.nim(2, 5)]
  19. (1, 5): 'fooCar' [var declared in mspellsuggest.nim(4, 5)]
  20. (2, 5): 'FooCar' [type declared in mspellsuggest.nim(6, 6)]
  21. (2, 5): 'GooBa' [type declared in mspellsuggest.nim(7, 6)]
  22. (3, 0): 'fooBarBaz' [const declared in tspellsuggest.nim(44, 11)]
  23. '''
  24. """
  25. # tests `--spellsuggest:num`
  26. # line 30
  27. import ./mspellsuggest
  28. var fooBar1 = 0
  29. let fooBar2 = 0
  30. const fooBar3 = 0
  31. proc fooBar4() = discard
  32. template fooBar5() = discard
  33. macro fooBar6() = discard
  34. proc main =
  35. var fooBar7 = 0
  36. block:
  37. var fooBar8 = 0
  38. const fooBarBaz = 0
  39. let x = fooBar