[Mono-bugs] [Bug 77353][Wis] New - Compiler Error for valid code using `ref` on a delegate

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 25 11:30:54 EST 2006

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 jonpryor at vt.edu.


--- shadow/77353	2006-01-25 11:30:54.000000000 -0500
+++ shadow/77353.tmp.2157	2006-01-25 11:30:54.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 77353
+Product: Mono: Compilers
+Version: 1.1
+OS: other
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jonpryor at vt.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Compiler Error for valid code using `ref` on a delegate
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Using `ref' on a paramater within a delegate declaration results in a
+CS0100 error for a "duplicate argument name" on the `ref' parameter.
+Compile the following code: mcs -t:library Zacix.cs
+	using System.Text;
+	namespace Agresso.Foundation {
+		public class Function
+		{
+		}
+		public delegate void Translate(Function function, 
+			ref StringBuilder result);
+	}
+Actual Results:
+Zacix.cs(9) error CS0100: The parameter name `result' is a duplicate
+Compilation failed: 1 error(s), 0 warnings
+Expected Results:
+No error.
+How often does this happen? 
+Additional Information:
+This bug has been around for a _long_ time -- it fails with mcs 1.0.5 as
+well as mcs 1.1.13 (or whatever version I had in my svn tree).

More information about the mono-bugs mailing list