|
| 1 | +conformant = "Partial" |
| 2 | +notes = """ |
| 3 | +Does not pick a winning overload based on arity, prior to considering argument types. |
| 4 | +""" |
| 5 | +conformance_automated = "Fail" |
| 6 | +errors_diff = """ |
| 7 | +Line 24: Unexpected errors ['overloads_evaluation.py:24:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in num_args: bad return type [bad-return-type]'] |
| 8 | +Line 36: Unexpected errors ['overloads_evaluation.py:36:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Any [assert-type]'] |
| 9 | +Line 42: Unexpected errors ['overloads_evaluation.py:42:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Any [assert-type]'] |
| 10 | +""" |
| 11 | +output = """ |
| 12 | +overloads_evaluation.py:24:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in num_args: bad return type [bad-return-type] |
| 13 | +
|
| 14 | + return 1 |
| 15 | + \u001b[1m\u001b[31m~\u001b[39m\u001b[0m |
| 16 | +
|
| 17 | +Called from (traceback): |
| 18 | + line 38, in current file |
| 19 | +overloads_evaluation.py:26:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Missing parameter 'x' in call to function num_args [missing-parameter] |
| 20 | +
|
| 21 | +num_args() # E: no matching overload |
| 22 | +\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m |
| 23 | +
|
| 24 | +overloads_evaluation.py:35:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Function num_args was called with the wrong arguments [wrong-arg-types] |
| 25 | +
|
| 26 | +ret2 = num_args(1, 1) # E: Literal[1] not assignable to str |
| 27 | + \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 28 | +
|
| 29 | +overloads_evaluation.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Any [assert-type] |
| 30 | +
|
| 31 | +assert_type(ret2, int) |
| 32 | +\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 33 | +
|
| 34 | +overloads_evaluation.py:41:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Function num_args was called with the wrong arguments [wrong-arg-types] |
| 35 | +
|
| 36 | +ret4 = num_args(1) # E: Literal[1] not assignable to str |
| 37 | + \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m |
| 38 | +
|
| 39 | +overloads_evaluation.py:42:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Any [assert-type] |
| 40 | +
|
| 41 | +assert_type(ret4, str) |
| 42 | +\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 43 | +
|
| 44 | +""" |
0 commit comments