Skip to content

Commit c5fa931

Browse files
committed
[WIP] test that stack overflows
1 parent e84d523 commit c5fa931

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/ty_python_semantic/resources/mdtest/pep695_type_aliases.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,14 @@ type X = tuple[X, int]
360360
def _(x: X):
361361
reveal_type(x is x) # revealed: bool
362362
```
363+
364+
### Recursive invariant
365+
366+
```py
367+
type X = dict[str, X]
368+
type Y = X | str | dict[str, Y]
369+
370+
def _(y: Y):
371+
if isinstance(y, dict):
372+
reveal_type(y)
373+
```

0 commit comments

Comments
 (0)