-
Notifications
You must be signed in to change notification settings - Fork 263
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
Confusing message for out parameters for new users #3835
Comments
The term "result parameter" is difficult to interpret for me. I would prefer "return value". Option 1 seems great. Consider adding a sentence "All return values must be assigned" |
Good catch for "result parameter" instead of now "return values" in option 3. See, even I am biased towards the Dafny language, it's good that we have these discussions just to realized how awkward a dialect might seem. I also added "All return values must be assigned" to option 1, which I think adds value. |
I vote for #1 |
) This PR fixes #3835 I added the corresponding test. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
We got several confused new Dafny users that, in the following program:
would not understand the error message
because they are passing the correct number of arguments to the method.
What is confusing is actually
Here are alternative messages that could help reduce the friction for new users
Please add your alternatives and/or vote so that we can make a better error message
Update
Based on three votes, we choose
The method returns 1 value(s) but is assigned to 0 variable(s). All return values must be assigned.
The text was updated successfully, but these errors were encountered: