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=80269 --- shadow/80269 2006-12-15 16:42:36.000000000 -0500 +++ shadow/80269.tmp.31086 2006-12-15 16:42:36.000000000 -0500 @@ -0,0 +1,60 @@ +Bug#: 80269 +Product: Mono: Class Libraries +Version: 1.0 +OS: other +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: TypeBuilder.GetMethod returns null (should throw NotSupportedException) + +MS throws NotSupportedException for the following code (Mono returns null): + +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 ("BaseObject"); + TypeBuilder TDerived = module.DefineType +("VariableDeclaration", TypeAttributes.Class, T); + TypeBuilder List = module.DefineType ("BaseList", +TypeAttributes.Class); + List.DefineGenericParameters ("X"); + List.SetParent (typeof (List<>).MakeGenericType +(List.GetGenericArguments ())); + TypeBuilder ListDerived = module.DefineType +("Nameables", TypeAttributes.Class); + ListDerived.DefineGenericParameters ("T"); + Type derivedList = ListDerived.MakeGenericType +(ListDerived.GetGenericArguments ()); + + MethodInfo method; + + Type [] paramTypes = new Type [1]; + paramTypes [0] = TDerived; + method = derivedList.GetMethod ("Add"); + Console.WriteLine ("FAILED"); + } + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
