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=78905

--- shadow/78905        2006-07-20 06:07:12.000000000 -0400
+++ shadow/78905.tmp.27096      2006-07-20 06:07:12.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 78905
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Reflection.ModuleBuilder.GetType fails to find types with 
certain names
+
+Description of Problem:
+ModuleBuilder.GetType() returns null when asked for a type returned by
+ModuleBuilder.GetTypes(). This seems to happen only when the type name
+contains special characters like '*'. In CLR it works OK (although it adds
+a backslash before the asterisk).
+
+
+Steps to reproduce the problem:
+       AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(new
+AssemblyName("test"), AssemblyBuilderAccess.Run);
+       ModuleBuilder mb = ab.DefineDynamicModule("module");
+       TypeBuilder tb = mb.DefineType("<*0>.<Global>");
+       Type type = tb.CreateType();
+
+       foreach (Type t in type.Module.GetTypes())
+       {
+               Console.WriteLine(t.FullName);
+       }
+
+       Console.WriteLine("Searching for '{0}'", type.FullName);
+       type = type.Module.GetType(type.FullName);
+       if (type != null)
+       {
+               Console.WriteLine("Got it");
+       }
+
+
+Actual Results:
+<*0>.<Global>
+Searching for '<*0>.<Global>'
+
+Expected Results:
+<*0>.<Global>
+Searching for '<*0>.<Global>'
+Got it
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to