Odin
Odin copied to clipboard
Error Message for assignment value mismatch is too vague
Context
- Operating System & Odin Version: git pulled 10 minutes ago (9th of March 2022, 12:13 PST)
Expected Behavior
A clearer message to explain what is actually going wrong ex: "Expected 2 assignment variables from function. Found 1"
Current Behavior
Vague message talking about mismatch of seemingly nothing (to beginners) Assignment count mismatch '1' = '2'
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- call a function that returns multiple values
- assign it to only 1 variable
- get the vague message
example code:
package main
foo :: proc () -> (u8, u8) {
return 'a', 'b'
}
main :: proc () {
x := foo()
}
Failure Logs
something that specifies that it is a mismatch of return count is needed
something like "Expected 2 assignment variables from foo. Found 1"
Hello!
I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue
- open a PR referencing and resolving the issue;
- leave a comment on it and discuss ideas how you could contribute towards resolving it;
- leave a comment and describe in detail why this issue is critical for your use case;
- open a new issue with updated details and a plan on resolving the issue.
The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..