(self, op: MethodCall)
| 388 | self.check_type_coercion(op, arg_value.type, arg_runtime.type) |
| 389 | |
| 390 | def visit_method_call(self, op: MethodCall) -> None: |
| 391 | # Similar to above, but we must look up method first. |
| 392 | method_decl = op.receiver_type.class_ir.method_decl(op.method) |
| 393 | if method_decl.kind == FUNC_STATICMETHOD: |
| 394 | decl_index = 0 |
| 395 | else: |
| 396 | decl_index = 1 |
| 397 | |
| 398 | if len(op.args) + decl_index != len(method_decl.sig.args): |
| 399 | self.fail(op, "Incorrect number of args for method call.") |
| 400 | |
| 401 | # Skip the receiver argument (self) |
| 402 | for arg_value, arg_runtime in zip(op.args, method_decl.sig.args[decl_index:]): |
| 403 | self.check_type_coercion(op, arg_value.type, arg_runtime.type) |
| 404 | |
| 405 | def visit_cast(self, op: Cast) -> None: |
| 406 | pass |
nothing calls this directly
no test coverage detected