20 using System.Collections.Generic;
24 using ErrorManagement;
26 using Semantic.SSAAlgorithm;
28 namespace TypeSystem.Constraints {
48 : base(firstOperand,
new Location()) {
56 : base(firstOperand, returnType,
new Location()) {
60 #region BuildTypeExpressionString()
62 return String.Format(
"{0}:=Clone({1})", this.ReturnType.FullName, this.FirstOperand.FullName);
66 #region CloneTypeVariables()
67 public override Constraint CloneTypeVariables(IDictionary<TypeVariable, TypeVariable> typeVariableMappings, IList<EquivalenceClass> equivalenceClasses) {
76 TypeExpression newFirstOperand = this.FirstOperand.CloneTypeVariables(typeVariableMappings, equivalenceClasses,
new List<ClassType>());
95 TypeExpression result = SSAHelper.CloneType(this.FirstOperand,methodAnalyzed);
96 this.ReturnType.Unify(result, SortOfUnification.Equivalent,
new List<Pair<TypeExpression, TypeExpression>>());
97 this.ReturnType.ValidTypeExpression = this.ValidTypeExpression =
false;
98 return this.ReturnType;
override TypeExpression CloneTypeVariables(IDictionary< TypeVariable, TypeVariable > typeVariableMappings, IList< EquivalenceClass > equivalenceClasses, IList< ClassType > clonedClasses)
Method that clones each type variable of a type expression. Equivalence classes are not cloned (but i...
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Abstract class that represents all different types.
Represents a generic type expression
Representa a method type.
override string BuildTypeExpressionString()