5 using TypeSystem.Constraints;
6 using DynVarManagement;
8 namespace TypeSystem.Operations {
25 this.methodAnalyzed = methodAnalyzed;
26 this.showErrorMessage = showErrorMessage;
27 this.location = location;
36 return a.ArrayTypeExpression;
41 #region TypeVariable []
45 if (subtitutions != null) {
46 DynVarOptions.Instance.AssignDynamism(subtitutions, a.IsDynamic);
47 return subtitutions.Exec(
this);
49 if (this.methodAnalyzed != null) {
52 this.methodAnalyzed.AddConstraint(bracketConstraint);
55 return bracketConstraint.ReturnType;
58 return ReportError(a);
62 #region PropertyType []
65 return a.PropertyTypeExpression.Exec(
this);
70 #region BCLClassType []
74 return TypeTable.Instance.GetType(a.TypeInfo.GetElementType().FullName, this.location);
76 if (a.
Methods.ContainsKey(
"get_Item")) {
82 return ReportError(a);
92 this.methodAnalyzed.AddConstraint(constraint);
93 return constraint.ReturnType;
101 returnType = UnionType.collect(returnType, ret);
111 return a.FieldTypeExpression.Exec(
this);
117 #region Report Errors
123 if (this.showErrorMessage)
Represents a error produced when tries to make an operation not allowed for the specified type...
Representa an array type.
override object Exec(FieldType a)
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.
MethodType methodAnalyzed
Dictionary< string, AccessModifier > Methods
Gets the method list
ArrayOperator
Array operators
override object Exec(BCLClassType a)
Abstract class that represents all different types.
Represents a generic type expression
virtual string FullName
Gets the full name of the type Note: WriteType expression is the longest recursive representation of ...
int ParameterListCount
Gets the number of parameters
Represent a integer type.
override object Exec(UnionType a)
Type TypeInfo
Returns the real introspective type
SquareBracketOperation(TypeExpression index, MethodType methodAnalyzed, bool showErrorMessage, Location location)
override object ReportError(TypeExpression tE)
Implements bracket operation of a type expression. Implments double dispatcher pattern.
TypeExpression FieldTypeExpression
Gets the field type.
virtual bool IsDynamic
Indicates if the type has been set as dynamic
override bool IsFreshVariable()
To know if it is a type variable with no substitution
Representa a property type.
Representa a method type.
override object Exec(ArrayType a)
override object Exec(PropertyType a)
static IntType Instance
Gets the unique instance of IntType
override object Exec(TypeVariable a)
TypeExpression PropertyTypeExpression
Gets the property type.
It represents constraints of the form: ret := ret := op1 [ op2 ]