20 using System.Collections.Generic;
22 using ErrorManagement;
24 namespace TypeSystem.Constraints {
44 get {
return location; }
50 get {
return this.firstOperand; }
57 get {
return this.returnType; }
71 this.firstOperand = firstOperand;
82 this.firstOperand = firstOperand;
83 this.returnType = returnType;
88 #region EqualsAndGetHashCode
89 public override bool Equals(
object obj) {
91 if (constraint == null)
93 return this.returnType.Variable == constraint.returnType.Variable;
96 return this.returnType.Variable;
override bool Equals(object obj)
static TypeVariable NewTypeVariable
Gets a new identify to the variable type
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.
ConstraintAdapter(TypeExpression firstOperand, TypeVariable returnType, Location loc)
Private constructor that receives the retun type variable
Abstract class that represents all different types.
Represents a generic type expression
override int GetHashCode()
It represents constraints of the form: ret := op1 op op2 Where op is an arithmetic operator ...