[Mono-bugs] [Bug 71302][Nor] New - GUID not set after creating type.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 14 Jan 2005 19:27:45 -0500 (EST)


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 miguel@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=71302

--- shadow/71302	2005-01-14 19:27:45.000000000 -0500
+++ shadow/71302.tmp.14517	2005-01-14 19:27:45.000000000 -0500
@@ -0,0 +1,47 @@
+Bug#: 71302
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: GUID not set after creating type.
+
+The following program should have no output:
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Threading;
+
+class X {
+	static string ASSEMBLY_NAME =
+"MonoTests.System.Reflection.Emit.TypeBuilderTest";
+	static private AssemblyBuilder assembly;
+	static private ModuleBuilder module;
+
+	static void Main ()
+	{
+		AssemblyName assemblyName = new AssemblyName();
+		assemblyName.Name = ASSEMBLY_NAME;
+
+		assembly = 
+			Thread.GetDomain().DefineDynamicAssembly(
+				assemblyName, AssemblyBuilderAccess.RunAndSave, "c:\\");
+
+		module = assembly.DefineDynamicModule("module1");
+		TypeBuilder tb = module.DefineType ("xx");
+		tb.CreateType ();
+		if (tb.GUID == Guid.Empty)
+			Console.WriteLine ("Failure");
+	}
+}