Exemple #1
0
        public override object Exec(TypeVariable a)   // this is a likely array
        {
            TypeExpression subtitutions = a.Substitution;

            if (subtitutions != null)
            {
                DynVarOptions.Instance.AssignDynamism(subtitutions, a.IsDynamic);
                return(subtitutions.Exec(this));
            }
            if (this.methodAnalyzed != null)
            {
                // * A bracket constraint is added to the method analyzed
                BracketConstraint bracketConstraint = new BracketConstraint(a, this.index, this.location);
                this.methodAnalyzed.AddConstraint(bracketConstraint);
                // * Also a promotion constriaint of the index to IntType
                //index.Promotion(IntType.Instance, ArrayOperator.Indexer, methodAnalyzed, fileName, line, column);
                return(bracketConstraint.ReturnType);
            }
            // We are at this point the operation is invalid, report the error.?
            return(ReportError(a));
        }