[Mono-bugs] [Bug 71301][Nor] New - BaseType for Interfaces created from TypeBuilder should be null.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 14 Jan 2005 19:26:15 -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=71301

--- shadow/71301	2005-01-14 19:26:15.000000000 -0500
+++ shadow/71301.tmp.14485	2005-01-14 19:26:15.000000000 -0500
@@ -0,0 +1,47 @@
+Bug#: 71301
+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: BaseType for Interfaces created from TypeBuilder should be null.
+
+The follwoing program should not display anything:
+
+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 tb3 = module.DefineType ("TT", TypeAttributes.Interface |
+TypeAttributes.Abstract);
+		if (tb3.BaseType != null)
+			Console.WriteLine ("Failure");
+	}
+}