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
#[make_struct]fnfoo(){}
comptime fnmake_struct(_f:FunctionDefinition) -> Quoted{quote{
struct MyStruct{}}}// Error: No type "MyStruct" in scopefnbar(s:MyStruct){ ...}
Expected Behavior
The program to resolve & type check correctly
Bug
The compiler issues an error stating that MyType is not in scope.
This is because function signatures are resolved before attributes are run, and thus before the new type is inserted into the program.
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & 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:
…5927)
# Description
## Problem\*
Resolves#5913
## Summary\*
Allows inserting new structs and impls into the program from comptime
attributes.
## Additional Context
Inserting new structs wasn't allowed originally since functions wouldn't
be able to refer to them in their signature. This use case isn't needed
for aztec currently so I'm adding this feature now and we can look into
expanding it later. See #5926
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[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.
# Description
## Problem\*
Resolves#5957
## Summary\*
Adds a generic to an existing struct.
## Additional Context
Due to the same reasoning in
#5926, existing code referring
to these structs won't see the generics on them. For now I've documented
to try to avoid this use case.
## Documentation\*
Check one:
- [ ] No documentation needed.
- [x] Documentation included in this PR.
- [ ] **[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.
---------
Co-authored-by: Ary Borenszweig <asterite@gmail.com>
Aim
Expected Behavior
The program to resolve & type check correctly
Bug
The compiler issues an error stating that MyType is not in scope.
This is because function signatures are resolved before attributes are run, and thus before the new type is inserted into the program.
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & 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: