Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DefinitionIds should not be stored in id_to_type #4397

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Feb 16, 2024

Description

Problem*

Resolves the underlying issue with #4207 where definition/expr types are being overwritten by other exprs/definitions because DefinitionIds are converted into Indexes which may clash with those from expressions.

Summary*

Separates out id_to_type into another map for only definitions: definition_to_type to resolve the clash. I've also removed the impl From<DefinitionId> for Index to prevent this issue in the future.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [Exceptional Case] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

@michaeljklein michaeljklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jfecher jfecher merged commit e49fde4 into michaeljklein/vec-arena Feb 16, 2024
37 of 39 checks passed
@jfecher jfecher deleted the jf/fix-4207 branch February 16, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants