-
Notifications
You must be signed in to change notification settings - Fork 199
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 frontend tests when `--use-elaborat…
…or` flag is specified (#5145) # Description ## Problem\* Resolves #5146 Fixes all failing frontend tests with the elaborator ## Summary\* This PR includes a few fixes: - Use `check_trait_impl_method_matches_declaration` to issue errors when a trait impl method is declared with an incorrect signature. - `define_function_meta` for default trait functions on impls when they're copied over. Also make sure to set `self.current_trait_impl` and `self.self_type` for them as well. - Use `try_get_trait_implementation` when getting a trait impl may fail (which may happen if there was a previous error resolving the trait for that impl). This was triggering on the test where we tried to declare a trait impl implementing a struct rather than a trait. - `check_trait_wrong_parameter_type` has a duplicate error on master but not in the elaborator so I changed the expected error count there. ## Additional Context After this PR all existing code _should_ work with the elaborator and we can get the word out to get others testing the `--use-elaborator` flag for any errors/panics. ## 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
4 changed files
with
31 additions
and
10 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
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
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
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