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
Does not pick a winning overload based on arity, prior to considering argument types.
4
3
Does not expand boolean arguments to Literal[True] and Literal[False].
5
4
Does not expand enum arguments to literal variants.
6
5
Does not expand tuple arguments to possible combinations.
7
6
"""
8
7
conformance_automated = "Fail"
9
8
errors_diff = """
10
-
Line 36: Unexpected errors ['overloads_evaluation.py:36: error: Expression is of type "Any", not "int" [assert-type]']
11
-
Line 42: Unexpected errors ['overloads_evaluation.py:42: error: Expression is of type "Any", not "str" [assert-type]']
12
-
Line 103: Unexpected errors ['overloads_evaluation.py:103: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]']
13
-
Line 104: Unexpected errors ['overloads_evaluation.py:104: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]']
14
-
Line 126: Unexpected errors ['overloads_evaluation.py:126: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]']
15
-
Line 127: Unexpected errors ['overloads_evaluation.py:127: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]']
16
-
Line 166: Unexpected errors ['overloads_evaluation.py:166: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]']
17
-
Line 167: Unexpected errors ['overloads_evaluation.py:167: error: Expression is of type "int", not "int | str" [assert-type]']
9
+
Line 106: Unexpected errors ['overloads_evaluation.py:106: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]']
10
+
Line 107: Unexpected errors ['overloads_evaluation.py:107: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]']
11
+
Line 129: Unexpected errors ['overloads_evaluation.py:129: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]']
12
+
Line 130: Unexpected errors ['overloads_evaluation.py:130: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]']
13
+
Line 169: Unexpected errors ['overloads_evaluation.py:169: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]']
14
+
Line 170: Unexpected errors ['overloads_evaluation.py:170: error: Expression is of type "int", not "int | str" [assert-type]']
18
15
"""
19
16
output = """
20
-
overloads_evaluation.py:27: error: All overload variants of "example1" require at least one argument [call-overload]
21
-
overloads_evaluation.py:27: note: Possible overload variants:
22
-
overloads_evaluation.py:27: note: def example1(x: int, y: str) -> int
Copy file name to clipboardExpand all lines: conformance/results/pyre/overloads_evaluation.toml
+29-29Lines changed: 29 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -9,35 +9,35 @@ Does not treat multiple matches due to gradual types as ambiguous.
9
9
"""
10
10
conformance_automated = "Fail"
11
11
errors_diff = """
12
-
Line 78: Unexpected errors ['overloads_evaluation.py:78:23 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.']
13
-
Line 79: Unexpected errors ['overloads_evaluation.py:79:4 Assert type [70]: Expected `Union[int, str]` but got `str`.']
14
-
Line 103: Unexpected errors ['overloads_evaluation.py:103:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.']
15
-
Line 104: Unexpected errors ['overloads_evaluation.py:104:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.']
16
-
Line 126: Unexpected errors ['overloads_evaluation.py:126:23 Incompatible parameter type [6]: In call `expand_enum`, for 1st positional argument, expected `typing_extensions.Literal[Color.RED]` but got `Color`.']
17
-
Line 127: Unexpected errors ['overloads_evaluation.py:127:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.']
18
-
Line 144: Unexpected errors ['overloads_evaluation.py:144:29 Incompatible parameter type [6]: In call `expand_type_union`, for 1st positional argument, expected `Type[int]` but got `Type[Union[int, str]]`.']
19
-
Line 145: Unexpected errors ['overloads_evaluation.py:145:4 Assert type [70]: Expected `Union[int, str]` but got `int`.']
20
-
Line 166: Unexpected errors ['overloads_evaluation.py:166:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`.']
21
-
Line 167: Unexpected errors ['overloads_evaluation.py:167:4 Assert type [70]: Expected `Union[int, str]` but got `int`.']
22
-
Line 193: Unexpected errors ['overloads_evaluation.py:193:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.']
23
-
Line 221: Unexpected errors ['overloads_evaluation.py:221:4 Assert type [70]: Expected `typing.Any` but got `int`.']
12
+
Line 81: Unexpected errors ['overloads_evaluation.py:81:23 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.']
13
+
Line 82: Unexpected errors ['overloads_evaluation.py:82:4 Assert type [70]: Expected `Union[int, str]` but got `str`.']
14
+
Line 106: Unexpected errors ['overloads_evaluation.py:106:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.']
15
+
Line 107: Unexpected errors ['overloads_evaluation.py:107:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.']
16
+
Line 129: Unexpected errors ['overloads_evaluation.py:129:23 Incompatible parameter type [6]: In call `expand_enum`, for 1st positional argument, expected `typing_extensions.Literal[Color.RED]` but got `Color`.']
17
+
Line 130: Unexpected errors ['overloads_evaluation.py:130:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.']
18
+
Line 147: Unexpected errors ['overloads_evaluation.py:147:29 Incompatible parameter type [6]: In call `expand_type_union`, for 1st positional argument, expected `Type[int]` but got `Type[Union[int, str]]`.']
19
+
Line 148: Unexpected errors ['overloads_evaluation.py:148:4 Assert type [70]: Expected `Union[int, str]` but got `int`.']
20
+
Line 169: Unexpected errors ['overloads_evaluation.py:169:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`.']
21
+
Line 170: Unexpected errors ['overloads_evaluation.py:170:4 Assert type [70]: Expected `Union[int, str]` but got `int`.']
22
+
Line 196: Unexpected errors ['overloads_evaluation.py:196:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.']
23
+
Line 224: Unexpected errors ['overloads_evaluation.py:224:4 Assert type [70]: Expected `typing.Any` but got `int`.']
overloads_evaluation.py:35:19 Incompatible parameter type [6]: In call `example1`, for 2nd positional argument, expected `str` but got `int`.
28
-
overloads_evaluation.py:41:16 Incompatible parameter type [6]: In call `example1`, for 1st positional argument, expected `str` but got `int`.
29
-
overloads_evaluation.py:78:23 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.
30
-
overloads_evaluation.py:79:4 Assert type [70]: Expected `Union[int, str]` but got `str`.
31
-
overloads_evaluation.py:86:13 Incompatible parameter type [6]: In call `example2`, for 1st positional argument, expected `int` but got `Union[int, str]`.
32
-
overloads_evaluation.py:86:16 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.
33
-
overloads_evaluation.py:103:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.
34
-
overloads_evaluation.py:104:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.
35
-
overloads_evaluation.py:126:23 Incompatible parameter type [6]: In call `expand_enum`, for 1st positional argument, expected `typing_extensions.Literal[Color.RED]` but got `Color`.
36
-
overloads_evaluation.py:127:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.
37
-
overloads_evaluation.py:144:29 Incompatible parameter type [6]: In call `expand_type_union`, for 1st positional argument, expected `Type[int]` but got `Type[Union[int, str]]`.
38
-
overloads_evaluation.py:145:4 Assert type [70]: Expected `Union[int, str]` but got `int`.
39
-
overloads_evaluation.py:166:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`.
40
-
overloads_evaluation.py:167:4 Assert type [70]: Expected `Union[int, str]` but got `int`.
41
-
overloads_evaluation.py:193:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.
42
-
overloads_evaluation.py:221:4 Assert type [70]: Expected `typing.Any` but got `int`.
overloads_evaluation.py:40:12 Incompatible parameter type [6]: In call `example1`, for 2nd positional argument, expected `str` but got `int`.
28
+
overloads_evaluation.py:45:9 Incompatible parameter type [6]: In call `example1`, for 1st positional argument, expected `str` but got `int`.
29
+
overloads_evaluation.py:81:23 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.
30
+
overloads_evaluation.py:82:4 Assert type [70]: Expected `Union[int, str]` but got `str`.
31
+
overloads_evaluation.py:89:13 Incompatible parameter type [6]: In call `example2`, for 1st positional argument, expected `int` but got `Union[int, str]`.
32
+
overloads_evaluation.py:89:16 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.
33
+
overloads_evaluation.py:106:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.
34
+
overloads_evaluation.py:107:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.
35
+
overloads_evaluation.py:129:23 Incompatible parameter type [6]: In call `expand_enum`, for 1st positional argument, expected `typing_extensions.Literal[Color.RED]` but got `Color`.
36
+
overloads_evaluation.py:130:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.
37
+
overloads_evaluation.py:147:29 Incompatible parameter type [6]: In call `expand_type_union`, for 1st positional argument, expected `Type[int]` but got `Type[Union[int, str]]`.
38
+
overloads_evaluation.py:148:4 Assert type [70]: Expected `Union[int, str]` but got `int`.
39
+
overloads_evaluation.py:169:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`.
40
+
overloads_evaluation.py:170:4 Assert type [70]: Expected `Union[int, str]` but got `int`.
41
+
overloads_evaluation.py:196:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.
42
+
overloads_evaluation.py:224:4 Assert type [70]: Expected `typing.Any` but got `int`.
0 commit comments