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
fnmain(){let a:[u8;10] = [1;10];let b:[Field;10] = a.map(|x| x asField);}
Expected Behavior
Compiles
Bug
Does not compile:
error: Expression type is ambiguous
┌─ /Users/leonidlogvinov/Dev/ZK/plain-repro/src/main.nr:3:36
│
3 │ let b: [Field; 10] = a.map(|x| x as Field);
│ ---------- Type must be known at this point
│
Aborting due to 1 previous error
To Reproduce
Try to compile
Project Impact
Nice-to-have
Impact Context
No response
Workaround
Yes
Workaround Description
I can write a loop instead, but it's uglier & more verbose. Ideally - would like to be able to cast whole arrays
Additional Context
No response
Installation Method
Binary (noirup default)
Nargo Version
nargo version = 0.28.0
NoirJS Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
Aim
Getting this code to compile:
Expected Behavior
Compiles
Bug
Does not compile:
To Reproduce
Project Impact
Nice-to-have
Impact Context
No response
Workaround
Yes
Workaround Description
I can write a loop instead, but it's uglier & more verbose. Ideally - would like to be able to cast whole arrays
Additional Context
No response
Installation Method
Binary (
noirup
default)Nargo Version
nargo version = 0.28.0
NoirJS Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: