You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Call expression type context should affect function argument inference #1356
Currently, the only type context we have access to when inferring function arguments is the annotated parameter type. However, the call expression annotation is also relevant, e.g.,
The problem is that we currently infer function arguments before the specializing the function call, and so the type context when inferring the list expression is still a typevar. On the other hand, we use the inferred argument types to infer the specialization, so there's a bit of a circular dependency here.
Activity
ibraheemdev commentedon Oct 17, 2025
Interestingly, this particular example would be resolved by #136, but something like a
TypedDictannotation would not.[ty] Improve generic call expression inference (#21210)
[ty] Improve generic call expression inference (#21210)