Closed PhilippMDoerner closed 2 years ago
I have come to notice that the PR #20151 may fix this issue, looking forward to it!
That PR fixes this issue and in fact another, similar one, that I had that made --warningAsError[UnusedImport]:on
unuseable.
See the comment in the PR for further infos
I tried compiling code with the
--hintAsError[XDeclaredButNotUsed]:on
flag turned on. When doing so, the compiler will always throw the following exception fromfatal.nim
. This makes the flag unuseable.Example
Current Output
The line this is talking about is the second one in the following code-block
Expected Output
Possible Solution
I don't have a direct solution, but I see multiple ways: 1) Make it so the flag does not apply to foreign packages, including systems.nim! (!) This is my preferred solution (!) 2) The usage of
gotoBasedExceptions
appears to be mostly withinwhen
statements. Could it be that for the compiler only being used in when statements does not count to escape this check? Maybe this could be changed.Additional Information
I do not know when this was introduced, I only started playing around with this around nim 1.6.6 and tested again with nim devel (1.7.1) and git head (installed via
choosenim #head
).