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
# Description
## Problem
Part of #5668
## Summary
Adds `FunctionDef::has_named_attributes` and also changes
`Expr::resolve` to take an optional `FunctionDefinition` so you can
resolve it relative to another function.
## Additional Context
Now the `inject_context` macro works like it needs to for
Aztec-Packages!... with the caveat that not all expressions are
currently handled in `Expr::mutate` yet.
## 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: jfecher <jake@aztecprotocol.com>
Resolves and type-checks this expression and returns the result as a `TypedExpr`. If any names used by this expression are not in scope or if there are any type errors, this will give compiler errors as if the expression was written directly into the current `comptime` function.
193
+
Resolves and type-checks this expression and returns the result as a `TypedExpr`.
194
+
195
+
The `in_function` argument specifies where the expression is resolved:
196
+
- If it's `none`, the expression is resolved in the function where `resolve` was called
197
+
- If it's `some`, the expression is resolved in the given function
198
+
199
+
If any names used by this expression are not in scope or if there are any type errors,
200
+
this will give compiler errors as if the expression was written directly into
0 commit comments