tspellsuggest2.nim 1.3 KB

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