[Mono-bugs] [Bug 71606][Min] New - CS0524 not reported when declaring delegate on interface
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 22 Jan 2005 11:49:42 -0500 (EST)
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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=71606
--- shadow/71606 2005-01-22 11:49:42.000000000 -0500
+++ shadow/71606.tmp.18622 2005-01-22 11:49:42.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 71606
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS0524 not reported when declaring delegate on interface
+
+When declaring a delegate on an interface csc reports error CS0524.
+
+Compile the following code snippet using mcs:
+
+public interface ITest {
+ delegate void Execute(int i);
+}
+
+Expected result:
+
+test.cs(2,16): error CS0524: 'Execute': interfaces cannot declare types
+
+Actual result:
+
+syntax error, got token `DELEGATE'
+test.cs(2) error CS1041: Identifier expected: `delegate' is a keyword
+syntax error, got token `CLOSE_BRACE'
+test.cs(3) error CS8025: Parsing error
+Compilation failed: 2 error(s), 0 warnings