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
// Also panic:// type Foo = [Field; -1]>;// type Foo = Bar<-1>;// type Foo = str<-1>;structFoo<letN:i8>{}fnmain(){let _:Foo<-1> = Foo{};}
Expected Behavior
Expected that the struct with a negative constant generic argument would compile successfully and that the types with invalid negative arguments would fail with a user type error.
Bug
The application panicked(crashed).Message:Negative literal is not allowed here
Location:compiler/noirc_frontend/src/ast/mod.rs:327
To Reproduce
Project Impact
Nice-to-have
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Installation Method
Binary (noirup default)
Nargo Version
nargo version = 0.31.0 noirc version = 0.31.0+45e82a672b9ba7f7326e8d9f8800e2489013e2e8 (git version hash: 45e82a6, is dirty: false)
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:
# Description
## Problem\*
Resolves#5552
## Summary\*
This temporarily disallows signed numeric generics as to prevent the
panic in the issue until they are fully supported. In general type-level
integers need to be updated to support numeric generics. It is deceiving
to not ban them until type-level integers are updated as otherwise users
can declare signed numeric generics but not actually use them as per the
linked issue.
For the code in the issue we now get this error:
<img width="697" alt="Screenshot 2024-07-19 at 5 41 13 PM"
src="https://github.com/user-attachments/assets/17979de7-8c82-40af-aa0f-a32f73992d48">
## Additional Context
## Documentation\*
Check one:
- [] No documentation needed.
- [ ] Documentation included in this PR.
- [X] **[For Experimental Features]** 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
Attempted to compile:
Expected Behavior
Expected that the struct with a negative constant generic argument would compile successfully and that the types with invalid negative arguments would fail with a user type error.
Bug
To Reproduce
Project Impact
Nice-to-have
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Installation Method
Binary (
noirup
default)Nargo Version
nargo version = 0.31.0 noirc version = 0.31.0+45e82a672b9ba7f7326e8d9f8800e2489013e2e8 (git version hash: 45e82a6, is dirty: false)
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: