Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions mypyc/test-data/run-lists.test
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,17 @@ def test_from_gen() -> None:
f = list("str:" + x for x in source_str)
assert f == ["str:a", "str:b", "str:c", "str:d"]

[case testNext]
from typing import List

def get_next(x: List[int]) -> int:
return next((i for i in x), -1)

def test_next() -> None:
assert get_next([]) == -1
assert get_next([1]) == 1
assert get_next([3,2,1]) == 3

[case testListGetItemWithBorrow]
from typing import List

Expand Down