-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
UserBugs reported by external users that should be prioritisedBugs reported by external users that should be prioritisedtypechecking
Description
from typing import Mapping, TypeAlias
B: TypeAlias = Mapping[str, int]
def func(a: Mapping[str, str] | B) -> None:
_ = next(iter(a.items()))
ERROR No matching overload found for function `iter` [no-matching-overload]
--> /home/marcogorelli/scratch/t.py:6:18
|
6 | _ = next(iter(a.items()))
| ^^^^^^^^^^^
|
Possible overloads:
(object: SupportsIter[_SupportsNextT_co], /) -> _SupportsNextT_co [closest match]
(object: _GetItemIterable[_T], /) -> Iterator[_T]
(object: () -> _T | None, sentinel: None, /) -> Iterator[_T]
(object: () -> _T, sentinel: object, /) -> Iterator[_T]
INFO 1 error
pyrefly 0.31.1
Metadata
Metadata
Assignees
Labels
UserBugs reported by external users that should be prioritisedBugs reported by external users that should be prioritisedtypechecking