MCPcopy Index your code
hub / github.com/python/mypy / check_control_op_targets

Method check_control_op_targets

mypyc/analysis/ircheck.py:250–253  ·  view source on GitHub ↗
(self, op: ControlOp)

Source from the content-addressed store, hash-verified

248 self.errors.append(FnError(source=source, desc=desc))
249
250 def check_control_op_targets(self, op: ControlOp) -> None:
251 for target in op.targets():
252 if target not in self.parent_fn.blocks:
253 self.fail(source=op, desc=f"Invalid control operation target: {target.label}")
254
255 def check_type_coercion(self, op: Op, src: RType, dest: RType) -> None:
256 if not can_coerce_to(src, dest):

Callers 2

visit_gotoMethod · 0.95
visit_branchMethod · 0.95

Calls 2

failMethod · 0.95
targetsMethod · 0.45

Tested by

no test coverage detected