We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the following code:
conditions = (x) => { return if (x < 5) { "a" } else if (x >= 5 && x < 10) { if (x == 7 || x == 9) { "b1" } else { "b" } } else if (x < 15) { "c" } }
👆🏽 Currently this yells as a Type Error pointing at "c":
[error]: Type error ╭──▶ /madness/examples/src/Temp.mad@22:5-22:8 │ 22 │ "c" • ┬── • ╰╸ expected: • String • • but found: • {} • ─────╯
But I think this error is misleading, because really what the compiler is saying is that this is an incomplete logical case, e.g.
conditions = (x) => { return if (x < 5) { "a" } else if (x >= 5 && x < 10) { if (x == 7 || x == 9) { "b1" } else { "b" } } else if (x < 15) { "c" } else { "d" } }
It would be helpful if the compiler said something closer to "Logically incomplete condition, there is a case which isn't yet accounted for"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given the following code:
👆🏽 Currently this yells as a Type Error pointing at "c":
But I think this error is misleading, because really what the compiler is saying is that this is an incomplete logical case, e.g.
It would be helpful if the compiler said something closer to "Logically incomplete condition, there is a case which isn't yet accounted for"
The text was updated successfully, but these errors were encountered: