Skip to content

Conversation

@noti0na1
Copy link
Member

@noti0na1 noti0na1 commented Dec 8, 2025

This PR fixes type inference issues when checking callee types and refine the TypeVar instantiation logic introduced by #24231.

  • When typing a function literal's expression to infer the callee type, we now create placeholder symbols for the function parameters. This ensures that references in the expression won't incorrectly resolve to outer scope variables with the same names as the parameters.
  • We only check the calleeType when there is actually a TypeVar to instantiate now, prioritizing inference from the callee.

Close #24686 #24689 #24694 #24696

Maybe #24695, since the behaviour is the same as 3.3 and 3.7 now.

…ee and improve type variable instantiation logic

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants