Author: raja
Date: 2005-04-13 06:21:45 -0400 (Wed, 13 Apr 2005)
New Revision: 42898

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/iterators.cs
   trunk/mcs/mcs/typemanager.cs
Log:
* typemanager.cs (IsUnmanagedType): Restore !IsValueType check
removed below.


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-04-13 09:57:47 UTC (rev 42897)
+++ trunk/mcs/mcs/ChangeLog     2005-04-13 10:21:45 UTC (rev 42898)
@@ -1,3 +1,8 @@
+2005-04-13  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
+       removed below.
+
 2005-04-13  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * doc.cs : detect ambiguous reference to overloaded members.

Modified: trunk/mcs/mcs/iterators.cs
===================================================================
--- trunk/mcs/mcs/iterators.cs  2005-04-13 09:57:47 UTC (rev 42897)
+++ trunk/mcs/mcs/iterators.cs  2005-04-13 10:21:45 UTC (rev 42898)
@@ -46,7 +46,7 @@
                                              "finally clause");
                                return false;
                        } else {
-                               Console.WriteLine ("Not in finally");
+                               Report.Debug ("Not in finally");
                        }
                        
                        if (ec.InUnsafe) {

Modified: trunk/mcs/mcs/typemanager.cs
===================================================================
--- trunk/mcs/mcs/typemanager.cs        2005-04-13 09:57:47 UTC (rev 42897)
+++ trunk/mcs/mcs/typemanager.cs        2005-04-13 10:21:45 UTC (rev 42898)
@@ -1533,15 +1533,19 @@
                if (t.IsArray)
                        return IsUnmanagedType (t.GetElementType ());
 
+               if (!IsValueType (t))
+                       return false;
+
                if (t is TypeBuilder){
                        TypeContainer tc = LookupTypeContainer (t);
-                       
                        if (tc.Fields == null)
                                return true;
                        foreach (Field f in tc.Fields){
                                // Avoid using f.FieldBuilder: f.Define () may 
not yet have been invoked.
                                if ((f.ModFlags & Modifiers.STATIC) != 0)
                                        continue;
+                               if (f.MemberType == null)
+                                       continue;
                                if (!IsUnmanagedType (f.MemberType))
                                        return false;
                        }

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

Reply via email to