Fix issues with generators, fixes #1624

This commit is contained in:
Dave Halter committed 2020-07-17 15:57:32 +02:00
1 parent d1851c369c
commit e4987b3e7a
4 files changed
+60 -11

No files matched your search

+19
View File
@@ -292,3 +292,22 @@ def test_in_brackets():
x = yield from [1]
#? None
x
# -----------------
# Annotations
# -----------------
from typing import Iterator
def annotation1() -> float:
yield 1
def annotation2() -> Iterator[float]:
yield 1
#?
next(annotation1())
#? float()
next(annotation2())