-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
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
Cannot print slices #1344
Comments
@vezenovm can you check if this is an issue with the new ssa? |
This is still a bug but for a new reason. As in the new println we use the Abi to encode/decode types, and because slices are not supported in the Abi we cannot print slices. |
Although not ideal, for now the workaround to print slices is to convert the slice into an array:
|
Adding onto this,
Which is confusing to users given that it is issued as a result of |
Maybe this issue is solved? At least this program works fine for me: fn main() {
let x = &[1, 2, 3];
println(x);
} (the original snippets aren't valid because those methods return arrays instead of slices) |
Aim
Running the following tests causes in a panic in
test1
whiletest2
passesExpected behavior
std::println
should work for all arraysBug
This is the error message
The application panicked (crashed). Message: array element being logged does not exist in memory Location: crates/noirc_evaluator/src/ssa/acir_gen/operations/intrinsics.rs:25
To reproduce
nargo test --show-output --allow-warnings test1
Installation method
Compiled from source
Nargo version
nargo 0.5.1 (git version hash: da47368, is dirty: false)
@noir-lang/noir_wasm version
No response
@noir-lang/barretenberg version
No response
@noir-lang/aztec_backend version
No response
Additional context
No response
Submission Checklist
The text was updated successfully, but these errors were encountered: