Inference/src/TypeSystem/Operations/BinaryArithmeticalOperation.cs
/// <summary>
/// If there are Substitution in the first operand, it return the result of aplying the operation using the substitution 
/// as first operand. It is not the case, a constraint is added and if showErrorMessages is true an error is raise.
/// </summary>
/// <param name="firstOperand">A TypeVariable</param>
/// <sumary>The type expression resulting of applying the operand and second operator. 
/// If somethis is worng and showMessages is true an error is raise.</sumary>
If there are Substitution in the first operand, it return the result of aplying the operation using the substitution
as first operand. It is not the case, a constraint is added and if showErrorMessages is true an error is raise.
If there are Substitution in the first operand it return the result of aplying the operation using the substitution as first operand . It is not the case a constraint is added and if showErrorMessages is true an error is raise .
public override object Exec(TypeVariable firstOperand, object arg) {
            if (firstOperand.Substitution != null) {
                DynVarOptions.Instance.AssignDynamism(firstOperand.Substitution, firstOperand.IsDynamic);
                return firstOperand.Substitution.AcceptOperation(this, arg);
            }
            if (methodAnalyzed != null) {
                ArithmeticConstraint constraint = new ArithmeticConstraint(firstOperand, secondOperand, binaryOperator, location);
                methodAnalyzed.AddConstraint(constraint);
                return constraint.ReturnType;
            }
            if (showErrorMessage)
                ErrorManager.Instance.NotifyError(new OperationNotAllowedError(binaryOperator.ToString(), firstOperand.FullName, secondOperand.FullName, location));
            return null;
        }
public override object Exec ( TypeVariable firstOperand , object arg ) { if ( firstOperand . Substitution != null ) { DynVarOptions . Instance . AssignDynamism ( firstOperand . Substitution , firstOperand . IsDynamic ) ; return firstOperand . Substitution . AcceptOperation ( this , arg ) ; } if ( methodAnalyzed != null ) { ArithmeticConstraint constraint = new ArithmeticConstraint ( firstOperand , secondOperand , binaryOperator , location ) ; methodAnalyzed . AddConstraint ( constraint ) ; return constraint . ReturnType ; } if ( showErrorMessage ) ErrorManager . Instance . NotifyError ( new OperationNotAllowedError ( binaryOperator . ToString ( ) , firstOperand . FullName , secondOperand . FullName , location ) ) ; return null ; }
If there are Substitution in the first operand, it return the result of aplying the operation using the substitution
as first operand.
If there are Substitution in the first operand it return the result of aplying the operation using the substitution as first operand .
// * A constraint is added to the method analyzed
firstOperand
TypeVariable
None
arg
object
sumary
The type expression resulting of applying the operand and second operator.
If somethis is worng and showMessages is true an error is raise.
The type expression resulting of applying the operand and second operator . If somethis is worng and showMessages is true an error is raise .