fix(experimental elaborator): Fix panic during monomorphization#5126
Merged
jfecher merged 2 commits intojf/elaborator-fixes7from May 28, 2024
Merged
fix(experimental elaborator): Fix panic during monomorphization#5126jfecher merged 2 commits intojf/elaborator-fixes7from
jfecher merged 2 commits intojf/elaborator-fixes7from
Conversation
vezenovm
reviewed
May 28, 2024
| pattern, | ||
| typ.clone(), | ||
| DefinitionKind::Local(None), | ||
| &mut parameter_idents, |
Contributor
There was a problem hiding this comment.
It feels like it may be cleaner to just save the hir idents on self then it can cleared after we are done elaborating a function meta. We can then remove the #[allow(clippy::too_many_arguments)] and the threading of the mutable reference.
Contributor
Author
There was a problem hiding this comment.
I want to avoid cluttering self with too many fields that are only used temporarily in a couple functions. Otherwise the object grows even larger, and it's already quite large since it has all of the name resolver's and type checker's fields.
michaeljklein
suggested changes
May 28, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem*
Resolves a panic in the elaborator during monomorphization related to parameters being resolved twice and having a different DefinitionId the second time.
Summary*
I've stored the original ids from the first resolution and switched to using only those.
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.