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

Backported from trunk.

svn path=/branches/mono-2-2/mcs/; revision=119078

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

index 3d5ef84dc19addf466eb1034e898a479b73b7255..7c32d370a514054b82a512c573943f37dfd428a7 100644 (file)
@@ -1,3 +1,10 @@
+2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * MonoField.cs (GetValue): Don't check for open generic types if the field
+       is a constant.
+
+       Backported from trunk.
+
 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);
                }