Skip to content

Commit ac2b3d2

Browse files
committed
Update return_type.md
1 parent 43d306b commit ac2b3d2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/ty_python_semantic/resources/mdtest/function/return_type.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,15 @@ def divergent2(value):
383383

384384
reveal_type(divergent2((1,))) # revealed: tuple[Divergent] | list[Divergent] | None
385385

386+
def list_int(x: int):
387+
if x > 0:
388+
return list1(list_int(x - 1))
389+
else:
390+
return list1(x)
391+
392+
# TODO: should be `list[int]`
393+
reveal_type(list_int(1)) # revealed: list[Divergent] | list[int]
394+
386395
def tuple_obj(cond: bool):
387396
if cond:
388397
x = object()

0 commit comments

Comments
 (0)