Skip to content

fix: DefinitionIds should not be stored in id_to_type#4397

Merged
jfecher merged 2 commits intomichaeljklein/vec-arenafrom
jf/fix-4207
Feb 16, 2024
Merged

fix: DefinitionIds should not be stored in id_to_type#4397
jfecher merged 2 commits intomichaeljklein/vec-arenafrom
jf/fix-4207

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
@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