ty icon indicating copy to clipboard operation
ty copied to clipboard

Intersection of fixed-length tuple with another type should be unpackable like the fixed-length tuple

Open SuperKenVery opened this issue 1 month ago • 0 comments

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

SuperKenVery avatar Dec 17 '25 06:12 SuperKenVery