-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solve
returns the value of its body, if any
#2017
Comments
Someone else may have more detailed comments, but this makes sense in terms of the expressions and types used. In example 1, when |
@sungshik thanks for raising this issue and @mahills thanks for your analysis. I completely agree with it. The title "solve returns a value -- sometimes" is a bit misleading and should be paraphrased as " solve returns the value of its body, if any". What kind of warning do you have in mind @mahills ? |
I'm not sure how doable it would be to add the warning I would like myself, which would be specifically to warn about situations where the result could be |
solve
returns a value -- sometimessolve
returns the value of its body, if any
@mahills: Thank you for clarifying! @PaulKlint: Thank you for the title suggestion; that's more accurate indeed. |
Issues
Sometimes,
solve
returns a value. Sometimes, it doesn't.solve
doesn't return a value, the types ofsolve (...) {...}
reported by the compiler and the interpreter are different (value
vsvoid
).Example 1
In this example,
solve
returns the final value ofx
.Example 2
In this example,
solve
doesn't return a value.int
expected, foundvalue
"Example 3
In this example,
solve
returns123
.The text was updated successfully, but these errors were encountered: