Inference/src/CodeGeneration/Operations/MajorTypeOperation.cs
/// <summary>
///  General behaviour of the operation As explained in the Class summary
/// </summary>
/// <param name="firstTypeExpression">the TypeExpression to compare with the attribute secondTypeExpression</param>
/// <param name="arg">not used</param>
/// <returns>the major type of both type expressions or null if there's no major type.</returns>
General behaviour of the operation As explained in the Class summary
General behaviour of the operation As explained in the Class summary
public override object Exec(TypeExpression firstTypeExpression, object arg) {
            if ( (int)firstTypeExpression.AcceptOperation(new PromotionLevelOperation(this.secondTypeExpression), null) >= 0 )
                return this.secondTypeExpression;
            if ( (int)this.secondTypeExpression.AcceptOperation(new PromotionLevelOperation(firstTypeExpression), null) >= 0 )
                return firstTypeExpression;
            return null;
        }
public override object Exec ( TypeExpression firstTypeExpression , object arg ) { if ( ( int ) firstTypeExpression . AcceptOperation ( new PromotionLevelOperation ( this . secondTypeExpression ) , null ) >= 0 ) return this . secondTypeExpression ; if ( ( int ) this . secondTypeExpression . AcceptOperation ( new PromotionLevelOperation ( firstTypeExpression ) , null ) >= 0 ) return firstTypeExpression ; return null ; }
General behaviour of the operation As explained in the Class summary
General behaviour of the operation As explained in the Class summary
the major type of both type expressions or null if there's no major type.
the major type of both type expressions or null if there ' s no major type .
firstTypeExpression
TypeExpression
the TypeExpression to compare with the attribute secondTypeExpression
the TypeExpression to compare with the attribute secondTypeExpression
arg
object
None