[ty] Infer slightly more precise types for comprehensions (#20111)
This commit is contained in:
@@ -75,7 +75,7 @@ a: tuple[()] = (1, 2)
|
||||
# error: [invalid-assignment] "Object of type `tuple[Literal["foo"]]` is not assignable to `tuple[int]`"
|
||||
b: tuple[int] = ("foo",)
|
||||
|
||||
# error: [invalid-assignment] "Object of type `tuple[list[Unknown], Literal["foo"]]` is not assignable to `tuple[str | int, str]`"
|
||||
# error: [invalid-assignment]
|
||||
c: tuple[str | int, str] = ([], "foo")
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user