Skip to content

Commit d40f547

Browse files
committed
Fix iterator element type extraction for yield from
1 parent 2526608 commit d40f547

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test-data/unit/check-functions.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3771,11 +3771,11 @@ def defer() -> int:
37713771

37723772

37733773
[case testYieldFromIteratorMismatch]
3774-
from typing import Generator, Iterator
3774+
from typing import Generator, Iterator,Tuple
37753775

37763776
class A(Iterator[int]):
37773777
def __next__(self) -> int: ...
37783778
def __iter__(self) -> "A": ...
37793779

3780-
def f() -> Generator[tuple[int, ...], None, None]:
3781-
yield from A() # E: Incompatible types in "yield"
3780+
def f() -> Generator[Tuple[int, ...], None, None]:
3781+
yield from A() # E: Incompatible types in "yield"

0 commit comments

Comments
 (0)