-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The following program:
impl H1 of DivRemHelper<BoundedInt<0, 10>, BoundedInt<1, 10>> {
type DivT = BoundedInt<0, 9>;
type RemT = BoundedInt<0, 9>;
}
#[inline(never)]
fn baz(a: BoundedInt<0, 10>, b: BoundedInt<1, 10>) -> felt252 {
let (q, _r) = div_rem(a, bounded_int_wrap_non_zero(b));
match q {
0 => 0x100,
1 => 0x10000,
2 => 0x1000000,
3 => 0x100000000,
4 => 0x10000000000,
5 => 0x1000000000000,
6 => 0x100000000000000,
7 => 0x10000000000000000,
8 => 0x1000000000000000000,
9 => 0x100000000000000000000,
_ => core::panic_with_felt252('unreachable - no code generated'),
}
}Causes both Sierra compiler of Cairo 2.13.0 and 2.14.0 to fail with the following error:
Error: Compilation failed.
Caused by:
#3: One of the arguments does not match the expected type of the libfunc or return statement.
But Native does compile this program and then fails when executing it with:
Invalid enum tag.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Todo