Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2008-07-21 Mark Probst <mark.probst@gmail.com>

	* reflection.c (mono_method_get_object): Don't let static RGCTX
	invoke wrappers get into MonoReflectionMethods.

2008-07-21  Mark Probst  <mark.probst@gmail.com>

	* generic-getgenericarguments.2.cs: Test case catching static
	RGCTX wrappers in MonoReflectionMethods.

	* Makefile.am: Test added.

svn path=/trunk/mono/; revision=108344
  • Loading branch information...
commit 6e09c535adaf8af0eed5ed6f25966e76f1b576e3 1 parent fbbb2b2
@schani schani authored
View
5 mono/metadata/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-21 Mark Probst <mark.probst@gmail.com>
+
+ * reflection.c (mono_method_get_object): Don't let static RGCTX
+ invoke wrappers get into MonoReflectionMethods.
+
2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
* object-internals.h:
View
7 mono/metadata/reflection.c
@@ -5937,6 +5937,13 @@ mono_method_get_object (MonoDomain *domain, MonoMethod *method, MonoClass *refcl
MonoClass *klass;
MonoReflectionMethod *ret;
+ /*
+ * Don't let static RGCTX invoke wrappers get into
+ * MonoReflectionMethods.
+ */
+ if (method->wrapper_type == MONO_WRAPPER_STATIC_RGCTX_INVOKE)
+ method = mono_marshal_method_from_wrapper (method);
+
if (method->is_inflated) {
MonoReflectionGenericMethod *gret;
View
7 mono/tests/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-21 Mark Probst <mark.probst@gmail.com>
+
+ * generic-getgenericarguments.2.cs: Test case catching static
+ RGCTX wrappers in MonoReflectionMethods.
+
+ * Makefile.am: Test added.
+
2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
* generics-sharing.2.cs: Fix the build.
View
4 mono/tests/Makefile.am
@@ -279,6 +279,7 @@ BASE_TEST_CS_SRC= \
generic-exceptions.2.cs \
generic-virtual2.2.cs \
generic-valuetype-interface.2.cs \
+ generic-getgenericarguments.2.cs \
recursive-generics.2.cs \
bug-80392.2.cs \
dynamic-method-access.2.cs \
@@ -721,7 +722,8 @@ test-generic-sharing : generics-sharing.2.exe shared-generic-methods.2.exe \
generic-array-exc.2.exe generic-special.2.exe \
generic-exceptions.2.exe generic-delegate2.2.exe \
generic-virtual2.2.exe generic-valuetype-interface.2.exe \
- generic-valuetype-newobj.2.exe generic-valuetype-newobj2.2.exe
+ generic-valuetype-newobj.2.exe generic-valuetype-newobj2.2.exe \
+ generic-getgenericarguments.2.exe
for fn in $+ ; do \
echo "Testing $$fn ..."; \
MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared $$fn || exit 1; \
View
20 mono/tests/generic-getgenericarguments.2.cs
@@ -0,0 +1,20 @@
+using System.Reflection;
+using System;
+
+public delegate void TestDelegate ();
+
+public class Bla {
+ public static void test<T> () {}
+}
+
+public class main {
+ public static int Main () {
+ TestDelegate del = new TestDelegate (Bla.test<object>);
+ MethodInfo minfo = del.Method;
+ Type[] args = minfo.GetGenericArguments ();
+
+ if (args.Length == 1)
+ return 0;
+ return 1;
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.