Inference/src/TypeSystem/Constraints/FieldTypeVariableAssignmentConstraint.cs
/// <summary>
/// Method that clones each type variable of a constraint.
/// Equivalence classes are not cloned (but included in the equivalenceClasses parameter.
/// </summary>
/// <param name="typeVariableMappings">Each new type varaiable represent a copy of another existing one.
/// This parameter is a mapping between them, wher tmpName=old and value=new</param>
/// <param name="equivalenceClasses">Each equivalence class of all the type variables.</param>
/// <returns>The new type expression (itself by default)</returns>
Method that clones each type variable of a constraint.
Equivalence classes are not cloned (but included in the equivalenceClasses parameter.
Method that clones each type variable of a constraint . Equivalence classes are not cloned ( but included in the equivalenceClasses parameter .
public override Constraint CloneTypeVariables(IDictionary<TypeVariable, TypeVariable> typeVariableMappings, IList<EquivalenceClass> equivalenceClasses) {
            TypeVariable newAlpha = (TypeVariable)this.alpha.CloneTypeVariables(typeVariableMappings, equivalenceClasses, new List<ClassType>());
            TypeExpression newBeta = this.beta.CloneTypeVariables(typeVariableMappings, equivalenceClasses, new List<ClassType>());
            FieldTypeVariableAssignmentConstraint newConstraint = new FieldTypeVariableAssignmentConstraint(newAlpha, this.memberName, newBeta, this.sortOfUnification);
            return newConstraint;
        }
public override Constraint CloneTypeVariables ( IDictionary < TypeVariable , TypeVariable > typeVariableMappings , IList < EquivalenceClass > equivalenceClasses ) { TypeVariable newAlpha = ( TypeVariable ) this . alpha . CloneTypeVariables ( typeVariableMappings , equivalenceClasses , new List < ClassType > ( ) ) ; TypeExpression newBeta = this . beta . CloneTypeVariables ( typeVariableMappings , equivalenceClasses , new List < ClassType > ( ) ) ; FieldTypeVariableAssignmentConstraint newConstraint = new FieldTypeVariableAssignmentConstraint ( newAlpha , this . memberName , newBeta , this . sortOfUnification ) ; return newConstraint ; }
Method that clones each type variable of a constraint.
Method that clones each type variable of a constraint .
The new type expression (itself by default)
The new type expression ( itself by default )
typeVariableMappings
IDictionary<TypeVariable, TypeVariable>
Each new type varaiable represent a copy of another existing one.
This parameter is a mapping between them, wher tmpName=old and value=new
Each new type varaiable represent a copy of another existing one . This parameter is a mapping between them wher tmpName = old and value = new
equivalenceClasses
IList<EquivalenceClass>
Each equivalence class of all the type variables.
Each equivalence class of all the type variables .