API reference
python:irx:irx.analysis.lossless_common_numeric_type
function lossless_common_numeric_type
lossless_common_numeric_type(lhs: astx.DataType, rhs: astx.DataType) -> astx.DataType | None
Source: packages/irx/src/irx/analysis/numeric_policy.py:142
Declared as: python:irx:irx.analysis.numeric_policy.lossless_common_numeric_type
Select the smallest containing numeric domain or reject the pair.
Preserve matching integer signedness; mixed signed/unsigned operands require a containing signed type. Integer-only operations never acquire a floating result. Mixed floating operands require exact conversion of the entire integer domain. Unsupported types fail closed.
Parameters
-
lhs — Type: astx.DataType
-
rhs — Type: astx.DataType
Returns
Type: astx.DataType | None