We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e26d94 commit 36c0e33Copy full SHA for 36c0e33
1 file changed
test-data/unit/pythoneval.test
@@ -2229,3 +2229,17 @@ def f(x: int, y: list[str]):
2229
x in y
2230
[out]
2231
_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