https://bugzilla.novell.com/show_bug.cgi?id=652952
https://bugzilla.novell.com/show_bug.cgi?id=652952#c0 Summary: MakeGenericMethod does not work on generic type definitions Classification: Mono Product: Mono: Class Libraries Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: CORLIB AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Compile & Run using System; using System.Reflection; using System.Reflection.Emit; class Program { static void Main () { AssemblyName asmname = new AssemblyName (); asmname.Name = "sre"; AssemblyBuilder asmbuild = System.Threading.Thread.GetDomain ().DefineDynamicAssembly (asmname, AssemblyBuilderAccess.RunAndSave); ModuleBuilder modbuild = asmbuild.DefineDynamicModule ("modulename", "sre.exe"); TypeBuilder myType = modbuild.DefineType ("Sample", TypeAttributes.Public); var tp = myType.DefineGenericParameters ("T"); var m_a = myType.DefineMethod ("MethodA", MethodAttributes.Public); var m_a_targ = m_a.DefineGenericParameters ("TA"); var m_b = myType.DefineMethod ("Methodb", MethodAttributes.Public); m_b.DefineGenericParameters ("TB"); var ilgen = m_a.GetILGenerator (); ilgen.Emit (OpCodes.Ldarg_0); ilgen.Emit (OpCodes.Call, m_b.MakeGenericMethod (m_a_targ)); ilgen.Emit (OpCodes.Ret); ilgen = m_b.GetILGenerator (); ilgen.Emit (OpCodes.Ret); myType.CreateType (); asmbuild.Save ("sre.exe"); return; } } Mono produces invalid call call instance void class Sample::Methodb<!!0> () instead of call instance void class Sample<!T>::Methodb<!!0> () -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
