@@ -3889,7 +3889,7 @@ def a4(x: List[str], y: List[Never]) -> None:
38893889[builtins fixtures/dict.pyi]
38903890
38913891
3892- [case testNonDeterminismFromNonCommuativeJoinInvolvingProtocolBaseAndPromotableType ]
3892+ [case testDeterminismCommutativityWithJoinInvolvingProtocolBaseAndPromotableType ]
38933893# flags: --python-version 3.11
38943894# Regression test for https://github.com/python/mypy/issues/16979#issuecomment-1982246306
38953895from __future__ import annotations
@@ -3907,13 +3907,6 @@ class _SupportsCompare(Protocol):
39073907class Comparable(_SupportsCompare):
39083908 pass
39093909
3910- class A(Generic[T, U]):
3911- @overload
3912- def __init__(self: A[T, T], a: T, b: T, /) -> None: ... # type: ignore[overload-overlap]
3913- @overload
3914- def __init__(self: A[T, U], a: T, b: U, /) -> Never: ...
3915- def __init__(self, *a) -> None: ...
3916-
39173910comparable: Comparable = Comparable()
39183911
39193912from typing import _promote
@@ -3925,9 +3918,21 @@ class floatlike:
39253918class intlike:
39263919 def __lt__(self, other: intlike, /) -> bool: ...
39273920
3921+
3922+ class A(Generic[T, U]):
3923+ @overload
3924+ def __init__(self: A[T, T], a: T, b: T, /) -> None: ... # type: ignore[overload-overlap]
3925+ @overload
3926+ def __init__(self: A[T, U], a: T, b: U, /) -> Never: ...
3927+ def __init__(self, *a) -> None: ...
3928+
3929+ def join(a: T, b: T) -> T: ...
3930+
3931+ reveal_type(join(intlike(), comparable)) # N: Revealed type is "__main__._SupportsCompare"
39283932reveal_type(A(intlike(), comparable)) # N: Revealed type is "__main__.A[__main__._SupportsCompare, __main__._SupportsCompare]"
39293933[builtins fixtures/tuple.pyi]
39303934[typing fixtures/typing-medium.pyi]
3935+
39313936[case testTupleJoinFallbackInference]
39323937foo = [
39333938 (1, ("a", "b")),
0 commit comments