Author: martin
Date: 2005-03-22 17:03:57 -0500 (Tue, 22 Mar 2005)
New Revision: 42129

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/expression.cs
Log:
2005-03-22  Martin Baulig  <[EMAIL PROTECTED]>

        * expression.cs (ComposedCast.DoResolveAsTypeStep): Put the old
        code back; this method has been completely rewritten in MCS, so
        the new changes will get in anyways when I merge the rest.



Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-03-22 21:15:18 UTC (rev 42128)
+++ trunk/mcs/gmcs/ChangeLog    2005-03-22 22:03:57 UTC (rev 42129)
@@ -1,5 +1,11 @@
 2005-03-22  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * expression.cs (ComposedCast.DoResolveAsTypeStep): Put the old
+       code back; this method has been completely rewritten in MCS, so
+       the new changes will get in anyways when I merge the rest.
+
+2005-03-22  Martin Baulig  <[EMAIL PROTECTED]>
+
        * typemanager.cs (TypeManager.GetField): Add support for generic
        instances.
 

Modified: trunk/mcs/gmcs/expression.cs
===================================================================
--- trunk/mcs/gmcs/expression.cs        2005-03-22 21:15:18 UTC (rev 42128)
+++ trunk/mcs/gmcs/expression.cs        2005-03-22 22:03:57 UTC (rev 42129)
@@ -9020,23 +9020,28 @@
                                return this;
                        }
 
-                       if (dim != "") {
+                       //
+                       // ltype.Fullname is already fully qualified, so we can 
skip
+                       // a lot of probes, and go directly to 
TypeManager.LookupType
+                       //
+                       string fname = ltype.FullName != null ? ltype.FullName 
: ltype.Name;
+                       string cname = fname + dim;
+                       type = TypeManager.LookupTypeDirect (cname);
+                       if (type == null){
                                //
+                               // For arrays of enumerations we are having a 
problem
+                               // with the direct lookup.  Need to investigate.
                                // ltype.Fullname is already fully qualified, 
so we can skip
                                // a lot of probes, and go directly to 
TypeManager.LookupType
                                //
                                // For now, fall back to the full lookup in 
that case.
-                               //      
-                               string fname = ltype.FullName != null ? 
ltype.FullName : ltype.Name;
-                               string cname = fname + dim;
-                               FullNamedExpression e = ec.DeclSpace.LookupType 
(
-                                       cname, loc, /*silent=*/ false, 
/*ignore_cs0104=*/ false);
+                               //
+                               FullNamedExpression e = ec.DeclSpace.LookupType 
(cname, loc, false, false);
                                if (e is TypeExpr)
                                        type = ((TypeExpr) e).ResolveType (ec);
                                if (type == null)
                                        return null;
-                       } else
-                               type = ltype;
+                       }
 
                        if (!ec.InUnsafe && type.IsPointer){
                                UnsafeError (loc);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to