Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80253 --- shadow/80253 2006-12-13 13:34:43.000000000 -0500 +++ shadow/80253.tmp.16457 2006-12-13 13:34:43.000000000 -0500 @@ -0,0 +1,55 @@ +Bug#: 80253 +Product: Mono: Class Libraries +Version: 1.0 +OS: other +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: TypeLoadException in Type.MakeGenericType + +The following code throws a TypeLoadException in Mono, but it completes +successfully in MS: + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Reflection.Emit; +using System.Text; + +namespace vbnc_bugs +{ + class Program + { + static void Main (string [] args) + { + AssemblyBuilder assembly = +AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("test"), +AssemblyBuilderAccess.RunAndSave); + ModuleBuilder module = +assembly.DefineDynamicModule("module"); + TypeBuilder T = module.DefineType ("T"); + TypeBuilder TDerived = module.DefineType("TDerived", +TypeAttributes.Class, T); + TypeBuilder List = module.DefineType ("List", +TypeAttributes.Class); + List.DefineGenericParameters("X"); + List.SetParent +(typeof(List<>).MakeGenericType(List.GetGenericArguments ())); + TypeBuilder ListDerived = +module.DefineType("ListDerived", TypeAttributes.Class); + ListDerived.DefineGenericParameters ("X"); + Type derivedList = +List.MakeGenericType(ListDerived.GetGenericArguments()); + Console.WriteLine (derivedList.Name); + } + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
