Skip to content

Avoid naming collision during synthesis#543

Merged
eb8680 merged 3 commits intomasterfrom
callable_redef_fix
Feb 7, 2026
Merged

Avoid naming collision during synthesis#543
eb8680 merged 3 commits intomasterfrom
callable_redef_fix

Conversation

@datvo06
Copy link
Contributor

@datvo06 datvo06 commented Feb 6, 2026

This PR:

  1. Add a AST-walking procedure to rename all colliding functions within the synthesized module.
  2. Also walk the body/FunctionDef recursively for renaming.
  3. Corresponding tests.

closes #542

@datvo06
Copy link
Contributor Author

datvo06 commented Feb 6, 2026

One subtlety is that the rename happens only inside the copied module during mypy type checking, so when we return the module after type checked, it is unmodified.

@eb8680 eb8680 merged commit e1cc110 into master Feb 7, 2026
6 checks passed
@eb8680 eb8680 deleted the callable_redef_fix branch February 7, 2026 16:00
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.

Synthesized Callable Name shouldn't matter

2 participants