Skip to content
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

Error messages on return statements may refer to an implicit assignment #3125

Closed
keyboardDrummer opened this issue Nov 29, 2022 · 0 comments · Fixed by #3130
Closed

Error messages on return statements may refer to an implicit assignment #3125

keyboardDrummer opened this issue Nov 29, 2022 · 0 comments · Fixed by #3130
Labels
area: error-reporting Clarity of the error reporting part: resolver Resolution and typechecking

Comments

@keyboardDrummer
Copy link
Member

method Foo() returns (i : int) {
  return "hello";
}

fails with:

Error: RHS (of type string) not assignable to LHS (of type int)

It would be better if the error message referred to the return statement instead of a 'LHS' and an assignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: error-reporting Clarity of the error reporting part: resolver Resolution and typechecking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant