Skip to content

Commit 36c0e33

Browse files
committed
Add test case
1 parent 5e26d94 commit 36c0e33

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test-data/unit/pythoneval.test

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,3 +2229,17 @@ def f(x: int, y: list[str]):
22292229
x in y
22302230
[out]
22312231
_testStrictEqualityWithList.py:3: error: Non-overlapping container check (element type: "int", container item type: "str")
2232+
2233+
[case testDictOrUnionEdgeCases]
2234+
from typing import Mapping, Sequence, Union
2235+
2236+
d: dict[str, list[str]]
2237+
m: Mapping[str, Sequence[str]] = d | d
2238+
2239+
A = dict[str, Union[A, int]]
2240+
d1: A
2241+
d2: A
2242+
d3: A = d1 | d2
2243+
reveal_type(d1 | d2)
2244+
[out]
2245+
_testDictOrUnionEdgeCases.py:10: note: Revealed type is "dict[str, dict[str, ... | int] | int]"

0 commit comments

Comments
 (0)