Skip to content

Commit

Permalink
add spam in d_final test
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst committed Oct 19, 2022
1 parent bf4364f commit 062fcb1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test-data/unit/check-typeddict.test
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,13 @@ if 'spam' in d_not_final:
else:
assert_type(d_not_final, DNotFinal)

d_final: DFinal

if 'spam' in d_final:
spam = 'ham' # E: Statement is unreachable
else:
assert_type(d_final, DFinal)

d_union: DFinal | DNotFinal

if 'foo' in d_union:
Expand Down

0 comments on commit 062fcb1

Please sign in to comment.