Skip to content

Commit 917d781

Browse files
committed
Add a crashing test
1 parent e03d3c1 commit 917d781

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test-data/unit/check-overloading.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6852,3 +6852,18 @@ if isinstance(headers, dict):
68526852

68536853
reveal_type(headers) # N: Revealed type is "Union[__main__.Headers, typing.Iterable[tuple[builtins.bytes, builtins.bytes]]]"
68546854
[builtins fixtures/isinstancelist.pyi]
6855+
6856+
[case testOverloadSelectionIgnoresContext]
6857+
from typing import TypeVar, overload
6858+
6859+
_T = TypeVar("_T")
6860+
6861+
@overload # type: ignore[no-overload-impl]
6862+
def gather(f1: _T) -> tuple[_T]: ...
6863+
@overload
6864+
def gather(*fns: object) -> int: ...
6865+
6866+
def crash() -> None:
6867+
foo: str
6868+
(foo,) = gather(0)
6869+
[builtins fixtures/tuple.pyi]

0 commit comments

Comments
 (0)