forked from noir-lang/noir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(experimental elaborator): Fix
impl Trait
when `--use-elaborator…
…` is selected (noir-lang#5138) # Description ## Problem\* Resolves errors when using `impl Trait` in the elaborator ## Summary\* Desugaring impl args was happening when elaborating the function when it should have been when defining the FuncMeta beforehand. Additionally, I've taken advantage of the fact that the elaborator also combines the type checking step and have shortened the `desugar_impl_args` function significantly by converting to resolved types instead and pushing to the function's resolved traits. This way there's no danger of users accidentally using the name generated for the implicit generic since it was never introduced into scope. ## Additional Context After this PR only the following two test_programs are still failing: tests::execution_success_global_consts tests::execution_success_hashmap I've yet to test to see if any of the frontend tests fail for the elaborator. ## 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.
- Loading branch information
Showing
1 changed file
with
41 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters