Inference/src/TypeSystem/Operations/AssignmentOperation.cs
/// <summary>
/// It performs a an assigment operation with a TypeVariable as left operand.
/// </summary>
/// <param name="leftOperand">leftOperand is Typevariable in the left par of the assignment</param>
/// <returns>The result of the assignment if possible null and error if not.</returns>
It performs a an assigment operation with a TypeVariable as left operand.
It performs a an assigment operation with a TypeVariable as left operand .
public override object Exec(TypeVariable leftOperand, object arg) {
            if (leftOperand.Substitution != null && this.unification == SortOfUnification.Equivalent)
                return rightOperand.AcceptOperation(PromotionOperation.Create(leftOperand, this.op, this.methodAnalyzed, this.location), arg);
            if (leftOperand.addToMyEquivalenceClass(rightOperand, this.unification, new List<Pair<TypeExpression, TypeExpression>>()))
                return leftOperand;
            ErrorManager.Instance.NotifyError(new OperationNotAllowedError(this.op.ToString(), leftOperand.FullName, rightOperand.FullName, this.location));
            return null;
        }
public override object Exec ( TypeVariable leftOperand , object arg ) { if ( leftOperand . Substitution != null && this . unification == SortOfUnification . Equivalent ) return rightOperand . AcceptOperation ( PromotionOperation . Create ( leftOperand , this . op , this . methodAnalyzed , this . location ) , arg ) ; if ( leftOperand . addToMyEquivalenceClass ( rightOperand , this . unification , new List < Pair < TypeExpression , TypeExpression > > ( ) ) ) return leftOperand ; ErrorManager . Instance . NotifyError ( new OperationNotAllowedError ( this . op . ToString ( ) , leftOperand . FullName , rightOperand . FullName , this . location ) ) ; return null ; }
It performs a an assigment operation with a TypeVariable as left operand.
It performs a an assigment operation with a TypeVariable as left operand .
// * Bounded variable? // * Check promotion to its substitution // * If the variable its not bounded, we add the parameter to the equivalence list // * If it has not been possible, error
The result of the assignment if possible null and error if not.
The result of the assignment if possible null and error if not .
leftOperand
TypeVariable
leftOperand is Typevariable in the left par of the assignment
leftOperand is Typevariable in the left par of the assignment
arg
object