You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Error: expression 'false' is of type 'bool' and has to be used (or discarded)`
Expected Output
Evaluate to `false`
Possible Solution
No response
Additional Information
Mixing different kinds of returns is not such a good style, but looks like it should be valid. If it's somehow not, the error message has to reflect that.
In a list of statements, every expression except the last one needs to have the
type void. In addition to this rule an assignment to the builtin result
symbol also triggers a mandatory void context for the subsequent expressions:
procinvalid*(): string=result="foo""invalid"# Error: value of type 'string' has to be discarded
Description
Nim Version
Verified for Nim
1.6.10
and1.9.1
.Current Output
Expected Output
Possible Solution
No response
Additional Information
Mixing different kinds of returns is not such a good style, but looks like it should be valid. If it's somehow not, the error message has to reflect that.
Seems to be related: #16855
The text was updated successfully, but these errors were encountered: