[Mono-bugs] [Bug 81643][Min] New - [GMCS] gmcs generates invalid il for null a : class constraint

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 16 15:48:43 EDT 2007


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 vargaz at gmail.com.

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

--- shadow/81643	2007-05-16 15:48:43.000000000 -0400
+++ shadow/81643.tmp.6476	2007-05-16 15:48:43.000000000 -0400
@@ -0,0 +1,37 @@
+Bug#: 81643
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: vargaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] gmcs generates invalid il for null a : class constraint
+
+Testcase:
+======================================================================
+using System;
+
+public class Tests {
+
+	public virtual ServiceType GetService<ServiceType>(params object[] args) 
+		where ServiceType : class {
+		return null;
+	}
+
+	public static int Main () {
+		return 0;
+	}
+}
+=======================================================================
+
+csc generates an initobj !!ServiceType, while gmcs generates an ldnull, and
+PEVerify flags this as invalid IL.


More information about the mono-bugs mailing list