[Mono-bugs] [Bug 354757] IsGenericMethodDefinition returns false for open generic method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 18 21:18:54 EST 2008


User rkumpera at novell.com added comment

Rodrigo Kumpera <rkumpera at novell.com> changed:

           What    |Removed                                         |Added
                 CC|                                                |rkumpera at novell.com
         AssignedTo|mono-bugs at lists.ximian.com                      |rkumpera at novell.com

--- Comment #1 from Rodrigo Kumpera <rkumpera at novell.com>  2008-01-18 19:18:51 MST ---
This bug is due to the way instances of MethodBuilder are inflated when 
MonoGenericType::initialize is called.

The issue is that we try to inflate generic methods when we are inflating the
generic type. This doesn't make any sense as no inflation should be done at

Aplying the diff below fixes it. I need to test it a lot before considering
this a proper fix.

Index: metadata/reflection.c
--- metadata/reflection.c       (revision 93177)
+++ metadata/reflection.c       (working copy)
@@ -9013,14 +9015,6 @@
        g_assert (klass->generic_class);
        context = mono_class_get_context (klass);

-       if (method->generic_container) {
-               g_assert (method->klass ==
-               tmp_context.class_inst =
-               tmp_context.method_inst =
-               context = &tmp_context;
-       }
        imethod = (MonoMethodInflated *) mono_class_inflate_generic_method_full
(method, klass, context);
        if (method->generic_container) {
                MOVING_GC_REGISTER (&imethod->reflection_info);

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list