Inference/src/TypeSystem/Operations/AssignmentOperation.cs
/// <summary>
/// Perform an assigment operation between an array and the typeExpression stored in this.rightOperand.
/// The type to asign to the array must be esquivalent, and the only allowable operator is AssignmentOperator
/// </summary>
/// <param name="leftOperand">An array to use as leftOperand in an assignment operation</param>
/// <returns>The typeExpression resulting of have been doing the operation. Or an error if there is.</returns>
Perform an assigment operation between an array and the typeExpression stored in this.rightOperand.
The type to asign to the array must be esquivalent, and the only allowable operator is AssignmentOperator
Perform an assigment operation between an array and the typeExpression stored in this . rightOperand . The type to asign to the array must be esquivalent and the only allowable operator is AssignmentOperator
public override object Exec(ArrayType leftOperand, object arg) {
            if (this.op == AssignmentOperator.Assign && (bool)this.rightOperand.AcceptOperation(new EquivalentOperation(leftOperand), arg)) {
                if (!leftOperand.HasTypeVariables())
                    return leftOperand;
                if (leftOperand.Unify(this.rightOperand, this.unification, new List<Pair<TypeExpression, TypeExpression>>()))
                    return leftOperand;
                else
                    return ReportError(leftOperand);
            }
            return ReportError(leftOperand);
        }
public override object Exec ( ArrayType leftOperand , object arg ) { if ( this . op == AssignmentOperator . Assign && ( bool ) this . rightOperand . AcceptOperation ( new EquivalentOperation ( leftOperand ) , arg ) ) { if ( ! leftOperand . HasTypeVariables ( ) ) return leftOperand ; if ( leftOperand . Unify ( this . rightOperand , this . unification , new List < Pair < TypeExpression , TypeExpression > > ( ) ) ) return leftOperand ; else return ReportError ( leftOperand ) ; } return ReportError ( leftOperand ) ; }
Perform an assigment operation between an array and the typeExpression stored in this.rightOperand.
Perform an assigment operation between an array and the typeExpression stored in this . rightOperand .
// * Unification, meter una ternaria aqúi? igual muy queda la linea muy grande
The typeExpression resulting of have been doing the operation. Or an error if there is.
The typeExpression resulting of have been doing the operation . Or an error if there is .
leftOperand
ArrayType
An array to use as leftOperand in an assignment operation
An array to use as leftOperand in an assignment operation
arg
object