[Mono-bugs] [Bug 80535][Wis] New - Generic constraints not being enforced correctly withing anonymous delegates

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jan 16 20:07:15 EST 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 dmitchell at logos.com.

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

--- shadow/80535	2007-01-16 20:07:15.000000000 -0500
+++ shadow/80535.tmp.15810	2007-01-16 20:07:15.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 80535
+Product: Mono: Compilers
+Version: 1.2
+OS: 
+OS Details: Also confirmed on Mac OS X
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: dmitchell at logos.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Generic constraints not being enforced correctly withing anonymous delegates
+
+Description of Problem:
+The attached file contains two functions, and each takes generic 
+parameters with constraints upon them. These functions also return 
+delegates that cast from a destination type to a source type.
+
+While Microsoft's C# compiler accepts this without complaint, Mono's C# 
+compiler issues errors. It should also be noted that doing the cast 
+within the function (instead of returning a delegate) results in no 
+errors on either platform
+
+Steps to reproduce the problem:
+1. Download the attached file
+2. Attempt to compile it using the /target:library option
+
+Actual Results:
+In gmcs:
+The first function results in error CS0029, and the second function 
+results in error CS0030.
+
+In csc:
+Compilation completes successfully
+
+Expected Results:
+Compilation should complete successfully
+
+How often does this happen? 
+Always


More information about the mono-bugs mailing list