ty
ty copied to clipboard
Intersection of fixed-length tuple with another type should be unpackable like the fixed-length tuple
Summary
Here's an example: https://play.ty.dev/948638ab-b0a1-45bf-a945-88d9b60a6dc9
Note the error message:
Return type does not match returned value: expected `int`, found `str | int`
This is not expected. There should be no error.
I initially came up with a more complex reproduction. Thanks to @rijuyuezhu for providing an even simpler reproduction.
Version
ty 0.0.2