[Mono-bugs] [Bug 80731][Nor] New - [2.0] CError CS0305 using event with generic parameter in partial class

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Feb 5 14:17:36 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 frederik.carlier at ugent.be.


--- shadow/80731	2007-02-05 14:17:36.000000000 -0500
+++ shadow/80731.tmp.5226	2007-02-05 14:17:36.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 80731
+Product: Mono: Compilers
+Version: 1.2
+OS Details: Ubuntu Edgy Eft, using Mono SVN
+Status: NEW   
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: frederik.carlier at ugent.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: [2.0] CError CS0305 using event with generic parameter in partial class
+Description of Problem:
+Say you have this kind of class
+    public partial class Test<T> 
+    {
+        public delegate void TestDelegate(object sender, T value);
+        public virtual event TestDelegate TestEvent;
+    }
+Using a certain construct of partial classes, this will generate a CS0305
+error. See below for repro steps.
+Steps to reproduce the problem:
+1. Unzip the attached files to a folder, say ~/monobug
+2. gmcs Test.Designer.cs Test.cs -target:library
+Actual Results:
+Test.cs(6,31): error CS0305: Using the generic type
+`Monobug.Test<T>.TestDelegate' requires 1 type arguments
+Compilation failed: 1 error(s), 0 warnings
+Expected Results:
+Compilation to succeed
+How often does this happen? 
+Additional Information:
+Note that when calling
+gmcs Test.cs Test.Designer.cs -target:library
+compilation works fine. In other words, the compilation depends on the
+order in which the files are specified -- which is clearly wrong. 
+I am using the SVN version from Mono (as from February, 04, 2007). This
+relates to, but is not a duplicate of, bug 80358 .

More information about the mono-bugs mailing list