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

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 18 11:10:25 EST 2008


           Summary: IsGenericMethodDefinition returns false for open generic
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

using System;
using System.Reflection;
using System.Reflection.Emit;

public class Entry
    public static void Main()
        AssemblyName name = new AssemblyName("I");
        AssemblyBuilder asmbuild =
        ModuleBuilder mod = asmbuild.DefineDynamicModule("I.exe");

        TypeBuilder G = mod.DefineType("G", TypeAttributes.Public);
        Type T = G.DefineGenericParameters("T")[0];
        Type GObj = G.MakeGenericType(new Type[] { typeof(object) });

        MethodBuilder M = G.DefineMethod("M", MethodAttributes.Public);
        Type S = M.DefineGenericParameters("S")[0];

        MethodInfo GObjM = TypeBuilder.GetMethod(GObj, M);
        Console.WriteLine (GObjM.IsGenericMethodDefinition);

Expected result: True

Actual result: False

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