* typemanager.cs (IsUnmanagedType): Restore !IsValueType check
authorRaja R Harinath <harinath@hurrynot.org>
Wed, 13 Apr 2005 10:21:45 +0000 (10:21 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Wed, 13 Apr 2005 10:21:45 +0000 (10:21 -0000)
removed below.

svn path=/trunk/mcs/; revision=42898

mcs/mcs/ChangeLog
mcs/mcs/iterators.cs
mcs/mcs/typemanager.cs

index 7ea9c2aa33371588feaf37c7499e3763bb7e625a..b5f1864f92b8fbb69bd648fd120e45d479cabfc2 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-13  Raja R Harinath  <rharinath@novell.com>
+
+       * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
+       removed below.
+
 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
 
        * doc.cs : detect ambiguous reference to overloaded members.
index be6f7750377be3c9c6bcb40e5e3beadec1b7a54e..db686fa9d709efb0090ea7bbe2549d274aee0f7d 100644 (file)
@@ -46,7 +46,7 @@ namespace Mono.CSharp {
                                              "finally clause");
                                return false;
                        } else {
-                               Console.WriteLine ("Not in finally");
+                               Report.Debug ("Not in finally");
                        }
                        
                        if (ec.InUnsafe) {
index 2a9a5e34594a4fb11f91c6a550ffa2519e9eb252..c2023b213595ba08600fe0c3513f7ca37e777c4f 100644 (file)
@@ -1533,15 +1533,19 @@ public class TypeManager {
                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;
                        }