You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def h(x: Sequence[T]) -> None: pass # E: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader
1329
1329
1330
-
# Safety of this highly depends on the implementation, so we lean towards being silent.
1331
1330
@overload
1332
-
def i(x: List[str]) -> int: pass
1331
+
def i(x: List[str]) -> int: pass # E: Overloaded function signatures 1 and 2 overlap with incompatible return types
1333
1332
@overload
1334
1333
def i(x: List[T]) -> None: pass
1335
1334
[builtins fixtures/list.pyi]
@@ -6768,3 +6767,18 @@ class D(Generic[T]):
6768
6767
a: D[str] # E: Type argument "str" of "D" must be a subtype of "C"
6769
6768
reveal_type(a.f(1)) # N: Revealed type is "builtins.int"
6770
6769
reveal_type(a.f("x")) # N: Revealed type is "builtins.str"
0 commit comments