You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should give a warning or an error, because -1 * x has no effect at all. An equivalent code in Rust gives an error saying "mismatched types" because one branch returns an integer, the other ().
Bug
Noir should check if branches have the same type, even if the if is a statement and not an expression.
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
Aim
This code:
Expected Behavior
Should give a warning or an error, because
-1 * x
has no effect at all. An equivalent code in Rust gives an error saying "mismatched types" because one branch returns an integer, the other()
.Bug
Noir should check
if
branches have the same type, even if theif
is a statement and not an expression.To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: