Access current module data in FunctionDefinition
and StructDefinition
#5953
Labels
enhancement
New feature or request
FunctionDefinition
and StructDefinition
#5953
Problem
It's sometimes necessary to learn about module data inside a func/struct annotation. This is required for initializer checks in
aztec.nr
: Inside#[private]
annotation we have to check whether any other function in the contract is an initializer.Happy Case
The
Module
object in which the current fn/struct lives is available via annotations:Workaround
Yes
Workaround Description
It's probably possible to modify all functions in a top-level annotation in the contract, but it is a lot uglier since we would have a giant single annotation and would lose debugability.
Additional Context
No response
Project Impact
Nice-to-have
Blocker Context
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: