Skip to content

Commit 062fcb1

Browse files
committed
add spam in d_final test
1 parent bf4364f commit 062fcb1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test-data/unit/check-typeddict.test

+7
Original file line numberDiff line numberDiff line change
@@ -2114,6 +2114,13 @@ if 'spam' in d_not_final:
21142114
else:
21152115
assert_type(d_not_final, DNotFinal)
21162116

2117+
d_final: DFinal
2118+
2119+
if 'spam' in d_final:
2120+
spam = 'ham' # E: Statement is unreachable
2121+
else:
2122+
assert_type(d_final, DFinal)
2123+
21172124
d_union: DFinal | DNotFinal
21182125

21192126
if 'foo' in d_union:

0 commit comments

Comments
 (0)