-// cs0072-2.cs: Event `Child.OnFoo' can override only event
+// CS0072: `Child.OnFoo': cannot override because `ErrorCS0072.OnFoo()' is not an event
// Line: 16
using System;
-// cs0072.cs: Event `Child.OnFoo' can override only event
+// CS0072: `Child.OnFoo': cannot override because `ErrorCS0072.OnFoo()' is not an event
// Line: 16
using System;
--- /dev/null
+// CS0111: `C.this[int[]]' is already defined. Rename this member or use different parameter types
+// Line: 6
+
+class C
+{
+ bool this [int[] i] { get { return true; } }
+ bool this [params int[] i] { get { return false; } }
+}
--- /dev/null
+// CS0114: `B.MyEvent' hides inherited member `A.MyEvent'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword
+// Line: 12
+// Compiler options: -warnaserror -warn:2
+
+using System;
+
+abstract class A {
+ public abstract event EventHandler MyEvent;
+}
+
+class B : A {
+ public event EventHandler MyEvent;
+}
-// cs0115.cs: `X.this[int]': no suitable method found to override
+// CS0115: `X.this[int]' is marked as an override but no suitable indexer found to override
// Line: 5
class X {
-// cs0115-3.cs: `MyTestExtended.GetName()': no suitable method found to override
+// CS0115: `MyTestExtended.GetName()' is marked as an override but no suitable method found to override
// Line: 12
// Compiler options: -r:CS0534-4-lib.dll
-// cs0115-4.cs: `DerivedClass.get_Value()': no suitable method found to override
+// CS0115: `DerivedClass.get_Value()' is marked as an override but no suitable method found to override
// Line: 13
class BaseClass {
--- /dev/null
+// CS0115: `B.MyMissingSuperclassEvent' is marked as an override but no suitable event found to override
+// Line: 10
+
+using System;
+
+class A {
+}
+
+class B : A {
+ public override event EventHandler MyMissingSuperclassEvent;
+}
\ No newline at end of file
-// cs0115.cs: `X.Bla()': no suitable method found to override
-// Line: 9
+// CS0115: `X.Bla()' is marked as an override but no suitable method found to override
+// Line: 5
class X {
public override void Bla ()
--- /dev/null
+// CS0179: `Bar.OnFoo' cannot declare a body because it is marked extern
+// Line: 9
+
+using System;
+
+public delegate void FooHandler ();
+
+class Bar {
+ extern event FooHandler OnFoo {
+ add { }
+ remove { }
+ }
+}
+
--- /dev/null
+// CS0179: `Bar.Foo' cannot declare a body because it is marked extern
+// Line: 5
+
+class Bar {
+ extern int Foo {
+ set { }
+ get { }
+ }
+}
+
+// CS0266: Cannot implicitly convert type `System.IntPtr' to `byte*'. An explicit conversion exists (are you missing a cast?)
+// Line: 23
+// Compiler options: -unsafe
+
using System;
public class Pixbuf {
--- /dev/null
+// CS0505: `DerivedClass.value()': cannot override because `BaseClass.value' is not a method
+// Line: 9
+
+using System;
+
+class BaseClass {
+ protected int value;
+}
+
+class DerivedClass: BaseClass {
+ protected override EventHandler value() {}
+}
+
--- /dev/null
+// CS0505: `DerivedClass.value()': cannot override because `BaseClass.value' is not a method
+// Line: 9
+
+using System;
+
+class BaseClass {
+ protected EventHandler value;
+}
+
+class DerivedClass: BaseClass {
+ protected override void value() {}
+}
+
--- /dev/null
+// CS0506: `DerivedClass.Test': cannot override inherited member `BaseClass.Test' because it is not marked virtual, abstract or override
+// Line: 11
+
+using System;
+
+class BaseClass {
+ protected event EventHandler Test;
+}
+
+class DerivedClass: BaseClass {
+ protected override event EventHandler Test;
+}
+
--- /dev/null
+// CS0507: `DerivedClass.Test': cannot change access modifiers when overriding `protected' inherited member `BaseClass.Test'
+// Line: 11
+
+using System;
+
+class BaseClass {
+ protected virtual event EventHandler Test;
+}
+
+class DerivedClass: BaseClass {
+ public override sealed event EventHandler Test;
+}
+
--- /dev/null
+// CS0533: `B.MyEvent' hides inherited abstract member `A.MyEvent'
+// Line: 11
+
+using System;
+
+abstract class A {
+ public abstract event EventHandler MyEvent;
+}
+
+class B : A {
+ public new event EventHandler MyEvent;
+}
--- /dev/null
+// CS0534: `B' does not implement inherited abstract member `A.MyEvent.add'
+// Line: 11
+
+using System;
+
+abstract class A {
+ public abstract event EventHandler MyEvent;
+}
+
+class B : A {
+ public event EventHandler MyEvent;
+}
-// cs0626-2.cs: Method, operator, or accessor `ExternClass.ExternMethod.set' is marked external and has no attributes on it. Consider adding a DllImport attribute to specify the external implementation
+// CS0626: `ExternClass.ExternMethod' is marked as an external but has no DllImport attribute. Consider adding a DllImport attribute to specify the external implementation
// Line: 6
// Compiler options: -warnaserror -warn:1
-// cs0626-3.cs: Method, operator, or accessor `ExternClass.implicit operator ExternClass(byte)' is marked external and has no attributes on it. Consider adding a DllImport attribute to specify the external implementation
+// CS0626: `ExternClass.implicit operator ExternClass(byte)' is marked as an external but has no DllImport attribute. Consider adding a DllImport attribute to specify the external implementation
// Line: 6
// Compiler options: -warnaserror -warn:1
-// cs0626-4.cs: Method, operator, or accessor `ExternClass.ExternMethod()' is marked external and has no attributes on it. Consider adding a DllImport attribute to specify the external implementation
+// CS0626: `ExternClass.ExternMethod()' is marked as an external but has no DllImport attribute. Consider adding a DllImport attribute to specify the external implementation
// Line: 6
// Compiler options: -warnaserror -warn:1
--- /dev/null
+// CS0626: `Test.OnFoo' is marked as an external but has no DllImport attribute. Consider adding a DllImport attribute to specify the external implementation
+// Line: 9
+// Compiler options: -warnaserror -warn:1
+
+
+using System;
+
+public delegate void Handler ();
+
+class Test {
+ extern event Handler OnFoo;
+}
+
-// cs0626.cs: Method, operator, or accessor `ExternClass.ExternMethod()' is marked external and has no attributes on it. Consider adding a DllImport attribute to specify the external implementation
+// CS0626: `ExternClass.ExternMethod()' is marked as an external but has no DllImport attribute. Consider adding a DllImport attribute to specify the external implementation
// Line: 6
// Compiler options: -warnaserror -warn:1
--- /dev/null
+// CS0672: Member `B.MyEvent' overrides obsolete member `A.MyEvent'. Add the Obsolete attribute to `B.MyEvent'
+// Line: 13
+// Compiler options: -warnaserror
+
+using System;
+
+class A {
+ [Obsolete]
+ public virtual event EventHandler MyEvent;
+}
+
+class B : A {
+ public override event EventHandler MyEvent;
+}
--- /dev/null
+// CS1715: `DerivedClass.Prop': type must be `System.EventHandler' to match overridden member `BaseClass.Prop'
+// Line: 9
+
+using System;
+
+class BaseClass {
+ protected virtual event EventHandler Prop;
+}
+
+delegate void TestD ();
+
+class DerivedClass: BaseClass {
+ protected override event TestD Prop;
+}
+
+
+