2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 17 Nov 2008 18:51:04 +0000 (18:51 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 17 Nov 2008 18:51:04 +0000 (18:51 -0000)
* MonoField.cs (GetValue): Don't check for open generic types if the field
is a constant.

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

mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/MonoField.cs

index 08063ef334d573c836718345022610846e1f0013..ed706faa2d21678630bb36e3b9df4b75b11a75f8 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * MonoField.cs (GetValue): Don't check for open generic types if the field
+       is a constant.
+
 2008-11-11  Rodrigo Kumpera  <rkumpera@novell.com>
 
        * Module.cs (ResolveMethod): Use internal method 
index 2b3894dd0ff693c5270ff53f025db433238acc20..c061f639665642e89bb793ea20a5854f0894fd15 100644 (file)
@@ -105,7 +105,8 @@ namespace System.Reflection {
                {
                        if (!IsStatic && obj == null)
                                throw new TargetException ("Non-static field requires a target");
-                       CheckGeneric ();
+                       if (!IsLiteral)
+                               CheckGeneric ();
                        return GetValueInternal (obj);
                }