MCPcopy Create free account
hub / github.com/python/mypy / check_compatibility

Method check_compatibility

mypyc/analysis/ircheck.py:261–263  ·  view source on GitHub ↗
(self, op: Op, t: RType, s: RType)

Source from the content-addressed store, hash-verified

259 )
260
261 def check_compatibility(self, op: Op, t: RType, s: RType) -> None:
262 if not can_coerce_to(t, s) or not can_coerce_to(s, t):
263 self.fail(source=op, desc=f"{t.name} and {s.name} are not compatible")
264
265 def expect_float(self, op: Op, v: Value) -> None:
266 if not is_float_rprimitive(v.type):

Callers 1

visit_comparison_opMethod · 0.95

Calls 2

failMethod · 0.95
can_coerce_toFunction · 0.85

Tested by

no test coverage detected