Closed
Description
I have seen patterns like this several times:
def func() -> Optional[int]:
pass
def test() -> List[int]:
vals: Iterable[Optional[int]] = [func() for _ in some_list]
if all(vals):
return list(vals) # None can't be in 'vals' here.
return []
It would be convenient if binder could understand this for covariant collections.