Skip to content

Commit 75dae80

Browse files
committed
Modify test for typevar ordering to use (AnyStr) -> AnyStr
1 parent 90615f1 commit 75dae80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test-data/unit/check-overloading.test

+4-4
Original file line numberDiff line numberDiff line change
@@ -1040,14 +1040,14 @@ from typing import overload, TypeVar
10401040
AnyStr = TypeVar('AnyStr', bytes, str)
10411041

10421042
@overload
1043-
def f(x: AnyStr) -> None: pass
1043+
def f(x: AnyStr) -> AnyStr: pass
10441044
@overload
1045-
def f(x: str) -> bool: pass
1045+
def f(x: str) -> str: pass
10461046

10471047
@overload
1048-
def g(x: str) -> bool: pass # E: Overloaded function signatures 1 and 2 overlap with incompatible return types
1048+
def g(x: str) -> str: pass # E: Overloaded function signatures 1 and 2 overlap with incompatible return types
10491049
@overload
1050-
def g(x: AnyStr) -> None: pass
1050+
def g(x: AnyStr) -> AnyStr: pass
10511051
[builtins fixtures/primitives.pyi]
10521052

10531053
[case testOverlappingOverloadCounting]

0 commit comments

Comments
 (0)