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
Compiler throws an error or accepts (compiles) the code.
Bug
The application panicked (crashed).
Message: Cannot have variable sized arrays as a parameter to main
Location: compiler/noirc_frontend/src/hir_def/types.rs:121
To Reproduce
Run nargo compile on
typeOuter<N> = [u8;N];fnmain(arg:Outer<1>){}
Project Impact
Blocker
Impact Context
The core library we're using cannot be compiled on the new Noir version because of this issue.
Workaround
None
Workaround Description
No response
Additional Context
No response
Installation Method
Binary (noirup default)
Nargo Version
nargo version = 0.25.0 noirc version = 0.25.0+3f676051a6073d6eabdc7fee68e4b522334344f6
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:
jfecher
changed the title
Compiler panics when using generic array with static length as argument in main
Compiler panics when using a type alias to a generic array with static length as argument in main
Mar 13, 2024
# Description
## Problem\*
Resolves#4545
## Summary\*
A prior assumption we had where we didn't need to bind generics just to
check how many fields a type can have turned out not to be true. Binding
generics is important for cases such as the new test case where generic
lengths are used.
## Additional Context
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Aim
Compiler doesn't panic when run
nargo compile
onExpected Behavior
Compiler throws an error or accepts (compiles) the code.
Bug
The application panicked (crashed).
Message: Cannot have variable sized arrays as a parameter to main
Location: compiler/noirc_frontend/src/hir_def/types.rs:121
To Reproduce
Run
nargo compile
onProject Impact
Blocker
Impact Context
The core library we're using cannot be compiled on the new Noir version because of this issue.
Workaround
None
Workaround Description
No response
Additional Context
No response
Installation Method
Binary (
noirup
default)Nargo Version
nargo version = 0.25.0 noirc version = 0.25.0+3f676051a6073d6eabdc7fee68e4b522334344f6
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: