[ty] Fix panic when trying to pull types for subscript expressions inside Callable type expressions#18534
Conversation
|
|
The new primer hits are because for this snippet: from basedtyping import P
reveal_type(P)We infer the type of |
6f76d88 to
7f6f3e2
Compare
|
With this PR, we also succeed in pulling types for the entirety of typeshed's |
ecf92a6 to
8e30df3
Compare
| if arguments_slice.is_tuple_expr() { | ||
| self.store_expression_type(arguments_slice, ty); | ||
| } |
There was a problem hiding this comment.
This is only being done for tuple expressions because otherwise it would already be present via the self.infer_type_expression(argument) call?
8e30df3 to
bd4a0f2
Compare
bd4a0f2 to
021b2db
Compare
…side `Callable` type expressions (astral-sh#18534)
Summary
We weren't storing types for subscript expressions inside the parameter list of
Callabletype expressions; this was the cause of the corpus test failures for two files in our vendored copy of typeshed.Test Plan
KNOWN_FAILUREScorpus list