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
Compiling code with if's with conditions that are witnesses:
fn main(a: bool, b: u32, c: u32) -> u32 { if a { b } else { c } }
Expected the code to compile
The compiler panics with
Message: assertion failed: `(left == right)` left: `Unsigned { bit_size: 1 }`, right: `Unsigned { bit_size: 32 }`: lhs and rhs types in Binary { lhs: Id(7176), rhs: Id(7183), operator: Mul } are not the same Location: crates/noirc_evaluator/src/ssa_refactor/acir_gen/mod.rs:484
since the desugaring into a*b + (!a)*c, a and b are different types in the multiplication. a is a bool and b is a u32.
a*b + (!a)*c
a
b
u32
This affects: 9_conditional, 8_arrays, and regression after #1767 is merged.
9_conditional
8_arrays
regression
None
No response
No
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Aim
Compiling code with if's with conditions that are witnesses:
Expected Behavior
Expected the code to compile
Bug
The compiler panics with
since the desugaring into
a*b + (!a)*c
,a
andb
are different types in the multiplication.a
is a bool andb
is au32
.This affects:
9_conditional
,8_arrays
, andregression
after #1767 is merged.To Reproduce
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: