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
The following panics when the annotation : Field is omitted.
fnbe_bytes_to_field<LEN>(bytes:[u8;LEN]) -> Field{letmut f = 0;letmut b = 1;letmut len = LEN - 1;// FAILS// let mut len: Field = LEN - 1; // SUCCEEDSfor i in0..LEN{let j = len - i;
f += (bytes[j]asField)* b;
b *= 256;}
f
}fnmain(bytes:[u8;8]) -> pub Field{let f:Field = be_bytes_to_field(bytes);
f
}#[test]fntest_bytes_to_field(){let bytes:[u8;8] = [0,0,0,0,0,1,3,1];let f = main(bytes);
std::println(f);}
Running 1 test functions...
Testing test_bytes_to_field...
The application panicked (crashed).
Message: internal error: entered unreachable code: Unexpected type error found
Location: crates/noirc_frontend/src/monomorphization/mod.rs:736
This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/.
If there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml
The following panics when the annotation
: Field
is omitted.Using latest Noir master, commit 4ecf3c4.
nargo test --show-output
The text was updated successfully, but these errors were encountered: