Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ChrisDodd
Copy link
Contributor

When a method is unified multiple times (for mulitple call sites), we need fresh TypeVars for each arg's type. The function to do this (cloneWithFreshTypeVariables) was not properly creating fresh Type_InfInt nodes, leading to problems if the method was called in multiple places with different types.

@ChrisDodd ChrisDodd requested review from asl and vlstill July 10, 2025 10:37
@ChrisDodd ChrisDodd force-pushed the cdodd-unification-fix branch from ca81e1a to eb0b0cc Compare July 10, 2025 10:53
- when a method is unified multiple times (for mulitple call sites), we
  need fresh TypeVars for each arg's type.  The function to do this
  (cloneWithFreshTypeVariables) was not properly creating fresh
  Type_InfInt nodes, leading to problems if the method was called in
  multiple places with different types.

Signed-off-by: Chris Dodd <[email protected]>
@ChrisDodd ChrisDodd added this pull request to the merge queue Jul 10, 2025
Merged via the queue into p4lang:main with commit 4d4704c Jul 10, 2025
20 checks passed
@ChrisDodd ChrisDodd deleted the cdodd-unification-fix branch July 10, 2025 21:19
@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Topics concerning the core segments of the compiler (frontend, midend, parser)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants