Techniques are disclosed to support the resolution of an operator which
has been called with inconsistent typing and at least one operand of a
user-defined type. In order to allow the compilation of such an
operation, first all possible widening conversions for each operand are
examined to determine if any widening conversions of any operands would
result in types over which the operator is defined. If not, both the
narrowing and the widening conversions of each operand are considered, to
determine if any conversions of either or both operands would result in
types for which the operator is defined. If only widening conversions are
used, the most encompassed possible result type is selected as the target
type. If a narrowing conversion is used, the most encompassing possible
result type is selected as the target type. In order to use the target
type, each operand is converted to the target type. The operation is then
performed using the converted operands.