Fix issues with generators, fixes #1624

This commit is contained in:
Dave Halter
2020-07-17 15:35:01 +02:00
parent d1851c369c
commit e4987b3e7a
4 changed files with 60 additions and 11 deletions

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())