*** merged revision 57555 from mcs
authorRaja R Harinath <harinath@hurrynot.org>
Sun, 26 Mar 2006 13:43:58 +0000 (13:43 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Sun, 26 Mar 2006 13:43:58 +0000 (13:43 -0000)
svn path=/trunk/mcs/; revision=58544

14 files changed:
mcs/errors/known-issues-gmcs
mcs/gmcs/ChangeLog
mcs/gmcs/attribute.cs
mcs/gmcs/class.cs
mcs/gmcs/decl.cs
mcs/gmcs/delegate.cs
mcs/gmcs/ecore.cs
mcs/gmcs/enum.cs
mcs/gmcs/expression.cs
mcs/gmcs/generic.cs
mcs/gmcs/parameter.cs
mcs/gmcs/rootcontext.cs
mcs/gmcs/statement.cs
mcs/gmcs/typemanager.cs

index 2d9a180a07918eedc778185447bce796b430793e..ec7b207c8e2bc372c2e3208231a0d197976dc923 100644 (file)
@@ -51,7 +51,6 @@ gcs0146.cs
 gcs0305-2.cs
 gcs0305.cs
 gcs0308.cs
-cs1547-3.cs
 cs0553-2.cs
 cs1669-2.cs NO ERROR
 cs1677.cs
index 778838abfa127235ad23dfee09363bec781888ac..0481f20232c6c8740dd8757219185928701c04d7 100644 (file)
@@ -1,3 +1,21 @@
+2006-03-03  Marek Safar  <marek.safar@seznam.cz>
+
+       * attribute.cs (ResolveAsTypeTerminal): Removed.
+
+       * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
+       specialization for predefined types; 30% speed up.
+       Finally placed obsolete check to right place.
+       (Expression.ResolveType): Removed.
+
+       * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
+       Updated after ResolveType was removed.
+
+       * expression.cs (Cast.ctor): Check void cast.
+       (Binary.ResolveAsTypeTerminal): Is never type.
+       (Conditional.ResolveAsTypeTerminal): Is never type.
+
+       * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
+
 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
 
        * rootcontext.cs (ResolveCore): Removed System.INullableValue.
index 7b352e52b982049a6ed7989114897dc0c92e832c..8c7315b64e3190b208d947c4c170d13f50217f32 100644 (file)
@@ -171,37 +171,22 @@ namespace Mono.CSharp {
                        Error_AttributeEmitError ("it is attached to invalid parent");
                }
 
-               protected virtual FullNamedExpression ResolveAsTypeTerminal (Expression expr, EmitContext ec, bool silent)
+               protected virtual TypeExpr ResolveAsTypeTerminal (Expression expr, IResolveContext ec, bool silent)
                {
                        return expr.ResolveAsTypeTerminal (ec, silent);
                }
 
-               protected virtual FullNamedExpression ResolveAsTypeStep (Expression expr, EmitContext ec, bool silent)
-               {
-                       return expr.ResolveAsTypeStep (ec, silent);
-               }
-
                Type ResolvePossibleAttributeType (string name, bool silent, ref bool is_attr)
                {
-                       // It will disapear when IResolveContext will take a place
-                       DeclSpace container = owner.ResolveContext.DeclContainer;
-                       if (owner is TypeParameter)
-                               container = ((TypeParameter)owner).DeclSpace;
-                       EmitContext ec = new EmitContext (owner.ResolveContext, container, container,
-                                       Location, null, null, container.ModFlags, false);
-                       //
+                       IResolveContext rc = owner.ResolveContext;
 
-                       FullNamedExpression fn;
+                       TypeExpr te;
                        if (LeftExpr == null) {
-                               fn = ResolveAsTypeTerminal (new SimpleName (name, Location), ec, silent);
+                               te = ResolveAsTypeTerminal (new SimpleName (name, Location), rc, silent);
                        } else {
-                               fn = ResolveAsTypeStep (LeftExpr, ec, silent);
-                               if (fn == null)
-                                       return null;
-                               fn = new MemberAccess (fn, name, Location).ResolveAsTypeTerminal (ec, silent);
+                               te = ResolveAsTypeTerminal (new MemberAccess (LeftExpr, name, Location), rc, silent);
                        }
 
-                       TypeExpr te = fn as TypeExpr;
                        if (te == null)
                                return null;
 
@@ -1368,19 +1353,7 @@ namespace Mono.CSharp {
                        RootContext.Tree.Types.NamespaceEntry = null;
                }
 
-               protected override FullNamedExpression ResolveAsTypeStep (Expression expr, EmitContext ec, bool silent)
-               {
-                       try {
-                               Enter ();
-                               return base.ResolveAsTypeStep (expr, ec, silent);
-                       }
-                       finally {
-                               Leave ();
-                       }
-               }
-
-
-               protected override FullNamedExpression ResolveAsTypeTerminal (Expression expr, EmitContext ec, bool silent)
+               protected override TypeExpr ResolveAsTypeTerminal (Expression expr, IResolveContext ec, bool silent)
                {
                        try {
                                Enter ();
index 7dea31c34b433a9dde2904691818104073d94f19..d53b0db38a141ccd4113bc22db7f66461ea73764 100644 (file)
@@ -1014,7 +1014,7 @@ namespace Mono.CSharp {
                        int start = 0, i, j;
 
                        if (Kind == Kind.Class){
-                               TypeExpr name = ResolveBaseTypeExpr ((Expression) Bases [0]);
+                               TypeExpr name = ((Expression) Bases [0]).ResolveAsBaseTerminal (this, false);
 
                                if (name == null){
                                        return null;
@@ -1031,7 +1031,7 @@ namespace Mono.CSharp {
                        TypeExpr [] ifaces = new TypeExpr [count-start];
                        
                        for (i = start, j = 0; i < count; i++, j++){
-                               TypeExpr resolved = ResolveBaseTypeExpr ((Expression) Bases [i]);
+                               TypeExpr resolved = ((Expression) Bases [i]).ResolveAsTypeTerminal (this, false);
                                if (resolved == null) {
                                        return null;
                                }
@@ -1236,10 +1236,6 @@ namespace Mono.CSharp {
                                RootContext.RegisterOrder (this); 
 
                        if (base_type != null) {
-                               base_type = base_type.ResolveAsTypeTerminal (this, false);
-                               if (base_type == null)
-                                       return false;
-
                                if (IsGeneric && TypeManager.IsAttributeType (base_type.Type)) {
                                        Report.Error (698, base_type.Location,
                                                      "A generic type cannot derive from `{0}' " +
@@ -1249,7 +1245,11 @@ namespace Mono.CSharp {
                                }
 
                                TypeBuilder.SetParent (base_type.Type);
-                               CheckObsoleteType (base_type);
+
+                               ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (base_type.Type);
+                               if (obsolete_attr != null && !IsInObsoleteScope) {
+                                       AttributeTester.Report_ObsoleteMessage (obsolete_attr, base_type.GetSignatureForError (), Location);
+                               }
                        }
 
                        if (!CheckRecursiveDefinition (this)) {
@@ -1258,7 +1258,7 @@ namespace Mono.CSharp {
 
                        // add interfaces that were not added at type creation
                        if (iface_exprs != null) {
-                               ifaces = TypeManager.ExpandInterfaces (this, iface_exprs);
+                               ifaces = TypeManager.ExpandInterfaces (iface_exprs);
                                if (ifaces == null) {
                                        return false;
                                }
@@ -1353,7 +1353,7 @@ namespace Mono.CSharp {
                public bool ResolveType ()
                {
                        if ((base_type != null) &&
-                           (base_type.ResolveType (this) == null)) {
+                           (base_type.ResolveAsTypeTerminal (this, false) == null)) {
                                error = true;
                                return false;
                        }
@@ -1404,7 +1404,7 @@ namespace Mono.CSharp {
                                        return false;
                                }
 
-                               CurrentType = current_type.ResolveType (this);
+                               CurrentType = current_type.Type;
                        }
 
                        return true;
@@ -5121,7 +5121,7 @@ namespace Mono.CSharp {
                                if (iface_texpr == null)
                                        return false;
 
-                               InterfaceType = iface_texpr.ResolveType (this);
+                               InterfaceType = iface_texpr.Type;
 
                                if (!InterfaceType.IsInterface) {
                                        Report.Error (538, Location, "'{0}' in explicit interface declaration is not an interface", TypeManager.CSharpName (InterfaceType));
@@ -5142,8 +5142,6 @@ namespace Mono.CSharp {
                        if (MemberType == null)
                                return false;
 
-                       CheckObsoleteType (Type);
-
                        if ((Parent.ModFlags & Modifiers.SEALED) != 0 && 
                                (ModFlags & (Modifiers.VIRTUAL|Modifiers.ABSTRACT)) != 0) {
                                        Report.Error (549, Location, "New virtual member `{0}' is declared in a sealed class `{1}'",
@@ -5190,7 +5188,7 @@ namespace Mono.CSharp {
                                if (texpr == null)
                                        return false;
 
-                               InterfaceType = texpr.ResolveType (this);
+                               InterfaceType = texpr.Type;
 
                                if (!InterfaceType.IsInterface) {
                                        Report.Error (538, Location, "`{0}' in explicit interface declaration is not an interface", TypeManager.CSharpName (InterfaceType));
@@ -5427,8 +5425,6 @@ namespace Mono.CSharp {
                        if (MemberType == null || Type == null)
                                return false;
                        
-                       CheckObsoleteType (Type);
-
                        if (MemberType == TypeManager.void_type) {
                                Report.Error (1547, Location, "Keyword 'void' cannot be used in this context");
                                return false;
index 32ec23a8b7ac66113a944c29431da15f7bd7b570..827143e98211d3c209e64b9ee35ca05f270903a8 100644 (file)
@@ -466,18 +466,6 @@ namespace Mono.CSharp {
                        AttributeTester.Report_ObsoleteMessage (oa, GetSignatureForError (), loc);
                }
 
-               protected void CheckObsoleteType (Expression type)
-               {
-                       ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (type.Type);
-                       if (obsolete_attr == null)
-                               return;
-
-                       if (IsInObsoleteScope)
-                               return;
-
-                       AttributeTester.Report_ObsoleteMessage (obsolete_attr, TypeManager.CSharpName (type.Type), type.Location);
-               }
-
                /// <summary>
                /// Analyze whether CLS-Compliant verification must be execute for this MemberCore.
                /// </summary>
@@ -843,15 +831,6 @@ namespace Mono.CSharp {
                        // Parent.GetSignatureForError
                        return Name;
                }
-
-               // <summary>
-               //    Resolves the expression `e' for a type, and will recursively define
-               //    types.  This should only be used for resolving base types.
-               // </summary>
-               protected TypeExpr ResolveBaseTypeExpr (Expression e)
-               {
-                       return e.ResolveAsTypeTerminal (this, false);
-               }
                
                public bool CheckAccessLevel (Type check_type) 
                {
index 77db0a961f435621ba4321ffb9db5daaf4c620d1..c6a22440ddcf5a2a4fdd552150a9fd060b87f5a3 100644 (file)
@@ -87,7 +87,7 @@ namespace Mono.CSharp {
                        if (TypeManager.multicast_delegate_type == null && !RootContext.StdLib) {
                                Namespace system = RootNamespace.Global.GetNamespace ("System", true);
                                TypeExpr expr = system.Lookup (this, "MulticastDelegate", Location) as TypeExpr;
-                               TypeManager.multicast_delegate_type = expr.ResolveType (this);
+                               TypeManager.multicast_delegate_type = expr.Type;
                        }
 
                        if (TypeManager.multicast_delegate_type == null)
@@ -216,8 +216,6 @@ namespace Mono.CSharp {
                        if (ret_type == null)
                                return false;
 
-                       CheckObsoleteType (ReturnType);
-
                        if (!Parent.AsAccessible (ret_type, ModFlags)) {
                                Report.Error (58, Location,
                                              "Inconsistent accessibility: return type `" +
index 509d7634e37e8d8da811b47acde9157d060e05e5..0e3b9d8c0f6efec7c99f4340b26302e26e1417bb 100644 (file)
@@ -234,6 +234,19 @@ namespace Mono.CSharp {
                // reference
                //
                public virtual TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent)
+               {
+                       TypeExpr te = ResolveAsBaseTerminal (ec, silent);
+                       if (te == null)
+                               return null;
+
+                       ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (te.Type);
+                       if (obsolete_attr != null && !ec.IsInObsoleteScope) {
+                               AttributeTester.Report_ObsoleteMessage (obsolete_attr, GetSignatureForError (), Location);
+                       }
+                       return te;
+               }
+
+               public TypeExpr ResolveAsBaseTerminal (IResolveContext ec, bool silent)
                {
                        int errors = Report.Errors;
 
@@ -2321,20 +2334,6 @@ namespace Mono.CSharp {
 
                protected abstract TypeExpr DoResolveAsTypeStep (IResolveContext ec);
 
-               public Type ResolveType (IResolveContext ec)
-               {
-                       TypeExpr t = ResolveAsTypeTerminal (ec, false);
-                       if (t == null)
-                               return null;
-
-                       ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (t.Type);
-                       if (obsolete_attr != null && !ec.IsInObsoleteScope) {
-                               AttributeTester.Report_ObsoleteMessage (obsolete_attr, Name, Location);
-                       }
-
-                       return t.Type;
-               }
-
                public abstract string Name {
                        get;
                }
@@ -2375,6 +2374,11 @@ namespace Mono.CSharp {
                        return this;
                }
 
+               public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent)
+               {
+                       return this;
+               }
+
                public override string Name {
                        get { return Type.ToString (); }
                }
@@ -2389,20 +2393,27 @@ namespace Mono.CSharp {
        ///   by the parser to setup the core types.  A TypeLookupExpression is always
        ///   classified as a type.
        /// </summary>
-       public class TypeLookupExpression : TypeExpr {
-               string name;
+       public sealed class TypeLookupExpression : TypeExpr {
+               readonly string name;
                
                public TypeLookupExpression (string name)
                {
                        this.name = name;
+                       eclass = ExprClass.Type;
+               }
+
+               public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent)
+               {
+                       // It's null for corlib compilation only
+                       if (type == null)
+                               return DoResolveAsTypeStep (ec);
+
+                       return this;
                }
 
                static readonly char [] dot_array = { '.' };
                protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
                {
-                       if (type != null)
-                               return this;
-
                        // If name is of the form `N.I', first lookup `N', then search a member `I' in it.
                        string rest = null;
                        string lookup_name = name;
@@ -2454,7 +2465,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       type = ((TypeExpr) resolved).ResolveType (ec);
+                       type = resolved.Type;
                        return this;
                }
 
@@ -2541,7 +2552,7 @@ namespace Mono.CSharp {
                        if (texpr == null)
                                return null;
 
-                       Type type = texpr.ResolveType (ec);
+                       Type type = texpr.Type;
                        int num_args = TypeManager.GetNumberOfTypeArguments (type);
 
                        if (args != null) {
@@ -2563,7 +2574,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       return new TypeExpression (type, loc);
+                       return texpr;
                }
 
                public override bool CheckAccessLevel (DeclSpace ds)
index 0cf0cd6ea5f5a04e8d2cc75b57a8c52a11ac2d7c..54570d9d8c3eef41f24c98ce6fde219b1fd23aa9 100644 (file)
@@ -248,7 +248,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       TypeExpr ute = ResolveBaseTypeExpr (BaseType);
+                       TypeExpr ute = BaseType.ResolveAsTypeTerminal (this, false);
                        UnderlyingType = ute.Type;
 
                        if (UnderlyingType != TypeManager.int32_type &&
index 2f842e4fe090fb07ed4a260b9d5e21378791f050..32dce23aa9767212dfac6dd09c71341471cf1ff0 100644 (file)
@@ -1055,8 +1055,6 @@ namespace Mono.CSharp {
                        probe_type_expr = ProbeType.ResolveAsTypeTerminal (ec, false);
                        if (probe_type_expr == null)
                                return null;
-                       if (probe_type_expr.ResolveType (ec) == null)
-                               return null;
 
                        expr = expr.Resolve (ec);
                        if (expr == null)
@@ -1327,6 +1325,10 @@ namespace Mono.CSharp {
                        this.target_type = cast_type;
                        this.expr = expr;
                        this.loc = loc;
+
+                       if (target_type == TypeManager.system_void_expr) {
+                               Report.Error (1547, loc, "Keyword `void' cannot be used in this context");
+                       }
                }
 
                public Expression TargetType {
@@ -1368,7 +1370,7 @@ namespace Mono.CSharp {
                        if (target == null)
                                return null;
                        
-                       type = target.ResolveType (ec);
+                       type = target.Type;
 
                        if (type.IsAbstract && type.IsSealed) {
                                Report.Error (716, loc, "Cannot convert to static type `{0}'", TypeManager.CSharpName (type));
@@ -2504,6 +2506,11 @@ namespace Mono.CSharp {
                        return ResolveOperator (ec);
                }
 
+               public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent)
+               {
+                       return null;
+               }
+
                private void CheckUselessComparison (Constant c, Type type)
                {
                        if (c == null || !IsTypeIntegral (type)
@@ -3440,6 +3447,11 @@ namespace Mono.CSharp {
                        return this;
                }
 
+               public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent)
+               {
+                       return null;
+               }
+
                public override void Emit (EmitContext ec)
                {
                        ILGenerator ig = ec.ig;
@@ -5899,7 +5911,7 @@ namespace Mono.CSharp {
                        if (texpr == null)
                                return null;
 
-                       type = texpr.ResolveType (ec);
+                       type = texpr.Type;
 
                        if (Arguments == null) {
                                Expression c = Constantify (type);
@@ -6387,7 +6399,7 @@ namespace Mono.CSharp {
                        if (array_type_expr == null)
                                return false;
 
-                       type = array_type_expr.ResolveType (ec);                
+                       type = array_type_expr.Type;
                        underlying_type = TypeManager.GetElementType (type);
                        dimensions = type.GetArrayRank ();
 
@@ -7123,7 +7135,7 @@ namespace Mono.CSharp {
                        if (texpr == null)
                                return null;
 
-                       typearg = texpr.ResolveType (ec);
+                       typearg = texpr.Type;
 
                        if (typearg == TypeManager.void_type) {
                                Error (673, "System.Void cannot be used from C#. Use typeof (void) to get the void type object");
@@ -7198,7 +7210,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       type_queried = texpr.ResolveType (ec);
+                       type_queried = texpr.Type;
 
                        int size_of = GetTypeSize (type_queried);
                        if (size_of > 0) {
@@ -7498,7 +7510,7 @@ namespace Mono.CSharp {
                        if (tnew_expr == null)
                                return null;
 
-                       Type expr_type = tnew_expr.ResolveType (rc);
+                       Type expr_type = tnew_expr.Type;
 
                        if (expr_type.IsPointer){
                                Error (23, "The `.' operator can not be applied to pointer operands (" +
@@ -8806,7 +8818,7 @@ namespace Mono.CSharp {
                        if (lexpr == null)
                                return null;
 
-                       Type ltype = lexpr.ResolveType (ec);
+                       Type ltype = lexpr.Type;
                        if ((ltype == TypeManager.void_type) && (dim != "*")) {
                                Report.Error (1547, Location,
                                              "Keyword 'void' cannot be used in this context");
@@ -8988,7 +9000,7 @@ namespace Mono.CSharp {
                        if (texpr == null)
                                return null;
 
-                       otype = texpr.ResolveType (ec);
+                       otype = texpr.Type;
 
                        if (!TypeManager.VerifyUnManaged (otype, loc))
                                return null;
index 2ce534aa021da00317a6ba3e8053b0aec56fa396..113388a0a14a991385b880f852833dc20e4cb48c 100644 (file)
@@ -390,13 +390,17 @@ namespace Mono.CSharp {
                                        return false;
                        }
 
-                       foreach (TypeExpr iface_constraint in iface_constraints) {
-                               if (iface_constraint.ResolveType (ec) == null)
+                       for (int i = 0; i < iface_constraints.Count; ++i) {
+                               TypeExpr iface_constraint = (TypeExpr) iface_constraints [i];
+                               iface_constraint = iface_constraint.ResolveAsTypeTerminal (ec, false);
+                               if (iface_constraint == null)
                                        return false;
+                               iface_constraints [i] = iface_constraint;
                        }
 
                        if (class_constraint != null) {
-                               if (class_constraint.ResolveType (ec) == null)
+                               class_constraint = class_constraint.ResolveAsTypeTerminal (ec, false);
+                               if (class_constraint == null)
                                        return false;
                        }
 
@@ -596,6 +600,11 @@ namespace Mono.CSharp {
                        }
                }
 
+               // FIXME: This should be removed once we fix the handling of RootContext.Tree.Types
+               public override DeclSpace DeclContainer {
+                       get { return DeclSpace; }
+               }
+
                /// <summary>
                ///   This is the first method which is called during the resolving
                ///   process; we're called immediately after creating the type parameters
index 93d7da083c5180a4e6d73a6f9b67efa2b1cad448..940043e35d9f391445706cc0ac92dc791569af12 100644 (file)
@@ -294,7 +294,7 @@ namespace Mono.CSharp {
                        if (tparam != null)
                                constraints = tparam.TypeParameter.Constraints;
 
-                       parameter_type = texpr.ResolveType (ec);
+                       parameter_type = texpr.Type;
                        
                        if (parameter_type.IsAbstract && parameter_type.IsSealed) {
                                Report.Error (721, Location, "`{0}': static types cannot be used as parameters", GetSignatureForError ());
index c392e8b81017dad35cbb3ae22a232c71f1fdf7ba..f5ad0c98a628e98b442f466f84a483d464fe13c3 100644 (file)
@@ -298,7 +298,9 @@ namespace Mono.CSharp {
                        TypeContainer root = Tree.Types;
 
                        TypeManager.object_type = BootstrapCorlib_ResolveClass (root, "System.Object");
+                       TypeManager.system_object_expr.Type = TypeManager.object_type;
                        TypeManager.value_type = BootstrapCorlib_ResolveClass (root, "System.ValueType");
+                       TypeManager.system_valuetype_expr.Type = TypeManager.value_type;
                        TypeManager.attribute_type = BootstrapCorlib_ResolveClass (root, "System.Attribute");
                        TypeManager.indexer_name_type = BootstrapCorlib_ResolveClass (root, "System.Runtime.CompilerServices.IndexerNameAttribute");
                        
index 27e4d61d75a0444dee5a964efad65c66fa2a222b..565d84bc3a69e92fcc5f40cf0f8ec7a46657adba 100644 (file)
@@ -1051,7 +1051,7 @@ namespace Mono.CSharp {
                                if (texpr == null)
                                        return false;
                                
-                               VariableType = texpr.ResolveType (ec);
+                               VariableType = texpr.Type;
                        }
 
                        if (VariableType == TypeManager.void_type) {
@@ -3365,7 +3365,7 @@ namespace Mono.CSharp {
                        if (texpr == null)
                                return false;
 
-                       expr_type = texpr.ResolveType (ec);
+                       expr_type = texpr.Type;
 
                        data = new Emitter [declarators.Count];
 
@@ -3590,7 +3590,7 @@ namespace Mono.CSharp {
                                        if (te == null)
                                                return false;
 
-                                       type = te.ResolveType (ec);
+                                       type = te.Type;
 
                                        if (type != TypeManager.exception_type && !type.IsSubclassOf (TypeManager.exception_type)){
                                                Error (155, "The type caught or thrown must be derived from System.Exception");
@@ -3829,7 +3829,7 @@ namespace Mono.CSharp {
                        if (texpr == null)
                                return false;
 
-                       expr_type = texpr.ResolveType (ec);
+                       expr_type = texpr.Type;
 
                        //
                        // The type must be an IDisposable or an implicit conversion
index 221989a2d0399c2dc96800c9f0234d1b5783464d..b8f82781aad84799e08b50038ec0c0315ad3b0ff 100644 (file)
@@ -2035,16 +2035,12 @@ public partial class TypeManager {
        ///   This expands in context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
        ///   be IA, IB, IC.
        /// </remarks>
-       public static Type[] ExpandInterfaces (IResolveContext ec, TypeExpr [] base_interfaces)
+       public static Type[] ExpandInterfaces (TypeExpr [] base_interfaces)
        {
                ArrayList new_ifaces = new ArrayList ();
 
                foreach (TypeExpr iface in base_interfaces){
-                       TypeExpr texpr = iface.ResolveAsTypeTerminal (ec, false);
-                       if (texpr == null)
-                               return null;
-
-                       Type itype = texpr.ResolveType (ec);
+                       Type itype = iface.Type;
 
                        if (new_ifaces.Contains (itype))
                                continue;