From a1a664dbcd6a69d1896398e95c6a74a8c95e1db7 Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Mon, 17 Nov 2008 18:55:16 +0000 Subject: [PATCH] 2008-11-17 Rodrigo Kumpera * 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 | 7 +++++++ mcs/class/corlib/System.Reflection/MonoField.cs | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog index 3d5ef84dc19..7c32d370a51 100644 --- a/mcs/class/corlib/System.Reflection/ChangeLog +++ b/mcs/class/corlib/System.Reflection/ChangeLog @@ -1,3 +1,10 @@ +2008-11-17 Rodrigo Kumpera + + * MonoField.cs (GetValue): Don't check for open generic types if the field + is a constant. + + Backported from trunk. + 2008-11-11 Rodrigo Kumpera * Module.cs (ResolveMethod): Use internal method diff --git a/mcs/class/corlib/System.Reflection/MonoField.cs b/mcs/class/corlib/System.Reflection/MonoField.cs index 2b3894dd0ff..c061f639665 100644 --- a/mcs/class/corlib/System.Reflection/MonoField.cs +++ b/mcs/class/corlib/System.Reflection/MonoField.cs @@ -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); } -- 2.25.1