-
Notifications
You must be signed in to change notification settings - Fork 223
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 panic in the elaborator (#5082)
# Description ## Problem\* Working towards #4594 ## Summary\* When run on a program the elaborator would always panic previously due to `FuncMeta`s not yet being set for other functions while one function was being elaborated. This is because we used to set them during name resolution and only check them during type checking, but now that these two passes are merged we'll need to set them all before elaboration instead. This PR creates a new `define_function_metas` function to create the `FuncMeta`s beforehand. I imagine there are more changes required here related to scoping / generics / parameters but this at least stops the panic. ## Additional Context This is the first of the elaborator PRs to feature only new changes rather than largely copied code, so feel free to critique as usual if you think a different approach would be better, notice an issue, etc. After this PR the elaborator will run on a small example program, only producing 1052 errors in the standard library 🙂. Most of these errors appear to be variants of "no method named '...' found for ..." and "no matching impl found for ..." ## 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. --------- Co-authored-by: Tom French <[email protected]> Co-authored-by: Maxim Vezenov <[email protected]>
- Loading branch information
1 parent
06dd2f2
commit ffcb410
Showing
9 changed files
with
161 additions
and
102 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
Oops, something went wrong.