Open patternspandemic opened 6 years ago
I think this is more generally a problem with the error message. At the very least maybe we could have a hint that says something about "destructive read" to give people a place to look? I don't necessarily think we need a specific error message for this situation (where the code indicates that the result of an initial destructive read should be returned by the function). I think the second error is also confusing (or even inaccurate) and should probably not appear.
I'd like to tackle this issue.
@adri326 have at it!
ponyc version:
source:
compiler output:
Furthermore, changing the return type of
confusing_error_msg
toNone
results in a successful build, without any error output mentioning unused variables. I remember receiving errors regarding unused declarations previously, and am unsure if they are still a compilation error.