[Mono-bugs] [Bug 48695][Nor] Changed - TypeBuilder: DefineDefaultConstructor throws NullReferenceException

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 29 Sep 2003 06:19:30 -0400 (EDT)


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 reali@acm.org.

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

--- shadow/48695	2003-09-26 13:35:24.000000000 -0400
+++ shadow/48695.tmp.1234	2003-09-29 06:19:30.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 48695
 Product: Mono/Class Libraries
 Version: unspecified
 OS: SuSE 8.1
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: reali@acm.org               
 QAContact: mono-bugs@ximian.com
@@ -28,6 +28,35 @@
 Created an attachment (id=5384)
 Test program: works (no exception) under .NET
 
 
 ------- Additional Comments From vargaz@freemail.hu  2003-09-26 13:35 -------
 Fixed in CVS.
+
+------- Additional Comments From reali@acm.org  2003-09-29 06:19 -------
+The call doesn't crash anymore, but this is still wrong: for class 
+types, the default superclass (also when null) is System.Object; 
+therefore System.Object.ctor should be called!
+
+In the test example, both methods shall have the same code; attached 
+is the generated code (note the missing .ctor invocation in TestClass2
+
+.method public specialname rtspecialname 
+        instance void  .ctor() cil managed
+{
+  // Code size       7 (0x7)
+  .maxstack  8
+  IL_0000:  ldarg.0
+  IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
+  IL_0006:  ret
+} // end of method TestClass1::.ctor
+
+
+.method public specialname rtspecialname 
+        instance void  .ctor() cil managed
+{
+  // Code size       1 (0x1)
+  .maxstack  8
+  IL_0000:  ret
+} // end of method TestClass2::.ctor
+
+