Ary Borenszweig
Ary Borenszweig
It's ready to review. There's [this discussion](https://github.com/noir-lang/noir/pull/8918#discussion_r2145974171) but the conclusion is that it should be safe to directly cast signed integers to Field.
I wonder, the SSA in the issue is this one: ```noir acir(inline) predicate_pure fn main f0 { b0(): v0 = make_array [] : [&mut u1; 0] constrain u1 0 ==...
Actually, this might be simpler. In this SSA: ```noir acir(inline) predicate_pure fn main f0 { b0(): v0 = make_array [] : [&mut u1; 0] constrain u1 0 == u1 1,...
I'll try the above in a separate PR, just because now I'm curious about it 😊
@TomAFrench Yes. I didn't know if this PR was also wanted, though I guess now unresolved loads can't (shouldn't) happen anymore.
Misleading error on dynamic indexing: operation known to overflow causes "only constant index" error
I also think that instructions that will always fail should produce a constrain error. For example this code: ```noir fn main() -> pub u32 { assert(false); 0 } ``` directly...
Misleading error on dynamic indexing: operation known to overflow causes "only constant index" error
> directly fails to compile Oh, actually it compiles. It says "bug" in red but you can actually execute the code, I didn't know that.
@noir-lang/core Actually, it seems a trait's where clause is completely ignored. "Find all references" of `NoirTrait.where_clause` gives no results (except when it's created from parsing).
The problem seems to be that we resolve `U60Repr::from2` to a trait method (we don't know the impl yet), then we default the integer types to `Field`, then we verify...
I wonder if this error should be produced on the SSA side instead of panicking when the "too much recursion" is detected. That way it would detect mutual recursion too.