nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.47k stars 1.47k forks source link

Nimsuggest's inlay exception hints don't work for iterators #23676

Open SirOlaf opened 3 months ago

SirOlaf commented 3 months ago

Description

Ref: https://github.com/nim-lang/Nim/pull/23610#issuecomment-2112346276

As mentioned iterators don't participate, didn't check whether or not it's a pure nimsuggest issue or if sempass2 also doesn't handle it, would assume it does though.

proc foo() =
  raise newException(ValueError, "a")

iterator bar(): int =
  raise newException(OSError, "b")

iterator foobar[T](): T =
  raise newException(LibraryError, "c")

foo() # bell

for x in bar(): # no bell
  discard

for x in foobar[float](): # no bell
  discard

Nim Version

2.1.1 git hash: 4bd1cf2376a25b14a28103db639707bbd99a44d0

Current Output

No response

Expected Output

No response

Possible Solution

No response

Additional Information

No response