[Mono-bugs] [Bug 52496][Wis] New - We do not report CS0068 well

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 5 Jan 2004 18:01:23 -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 miguel@ximian.com.

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

--- shadow/52496	2004-01-05 18:01:23.000000000 -0500
+++ shadow/52496.tmp.11548	2004-01-05 18:01:23.000000000 -0500
@@ -0,0 +1,102 @@
+Bug#: 52496
+Product: Mono/Compilers
+Version: unspecified
+OS: unknown
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: We do not report CS0068 well
+
+interface I
+{
+	event System.Delegate d = null;
+}
+
+class M
+{
+	public static void Main()
+	{
+	}
+}
+
+MS gives:
+t.cs(3,24): error CS0068: 'I.d': event in interface cannot have initializer
+
+We give
+syntax error, expecting SEMICOLON
+t.cs(3) error CS1041: Identifier expected
+System.NullReferenceException: Object reference not set to an instance of 
+an obj
+ect.
+   at Mono.CSharp.Interface.AddEvent(InterfaceEvent ievent)
+   at Mono.CSharp.CSharpParser.yyparse(yyInput yyLex)
+   at Mono.CSharp.CSharpParser.parse()
+t.cs(3) error CS8025: Parsing error
+
+------- Additional Comments From bmaurer@users.sf.net  2003-12-23 13:43 -------
+Related, we do not report CS0069
+
+interface I
+{
+	event System.Delegate d  { add {} remove {} }
+}
+
+class M
+{
+	public static void Main()
+	{
+	}
+}
+
+MS :
+t.cs(3,24): error CS0069: 'I.d': event in interface cannot have add 
+or remove accessors
+MCS :
+syntax error, expecting SEMICOLON
+t.cs(3) error CS1041: Identifier expected
+System.NullReferenceException: Object reference not set to an 
+instance of an obj
+ect.
+   at Mono.CSharp.Interface.AddEvent(InterfaceEvent ievent)
+   at Mono.CSharp.CSharpParser.yyparse(yyInput yyLex)
+   at Mono.CSharp.CSharpParser.parse()
+t.cs(3) error CS8025: Parsing error
+
+------- Additional Comments From bmaurer@users.sf.net  2003-12-23 13:47 -------
+We do not report CS0071
+using System;
+
+interface IBlah
+{
+	event Delegate Foo;
+}
+
+class Test : IBlah {
+	event MyEvent ITest.Foo;
+
+	public static void Main ()
+	{
+	}
+}
+
+CSC:
+t.cs(9,21): error CS0071: An explicit interface implementation of an 
+event must
+        use property syntax
+
+We give a parser error.
+
+
+
+------- Additional Comments From miguel@ximian.com  2004-01-05 18:01 -------
+You should not use a single bug report for different errors, even if
+they appear related.