[Mono-bugs] [Bug 76806][Min] New - [GMCS] gmcs ignores T: class constraint on method type parameter

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Nov 23 17:47:24 EST 2005


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

--- shadow/76806	2005-11-23 17:47:24.000000000 -0500
+++ shadow/76806.tmp.25519	2005-11-23 17:47:24.000000000 -0500
@@ -0,0 +1,36 @@
+Bug#: 76806
+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 ignores T: class constraint on method type parameter
+
+Testcase:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Reflection;
+using System.Threading;
+
+class C {
+  public static void Main ()
+  {
+	  int i = 0;
+	  Interlocked.CompareExchange<int> (ref i, 0, 0);
+  }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+gmcs compiles this just fine, while csc prints a CS0452: The type 'int'
+must be a reference type ...


More information about the mono-bugs mailing list