Skip to content

Commit 29c3463

Browse files
committed
add test
1 parent 05cfabd commit 29c3463

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test-data/unit/check-unreachable-code.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,3 +1446,11 @@ def f() -> None:
14461446
Foo()['a'] = 'a'
14471447
x = 0 # This should not be reported as unreachable
14481448
[builtins fixtures/exception.pyi]
1449+
1450+
[case testIntentionallyEmptyGenerator]
1451+
# flags: --warn-unreachable
1452+
from typing import Generator
1453+
1454+
def f() -> Generator[None, None, None]:
1455+
return
1456+
yield

0 commit comments

Comments
 (0)