Author: marek
Date: 2007-01-14 09:27:33 -0500 (Sun, 14 Jan 2007)
New Revision: 70979

Added:
   trunk/mcs/errors/cs0111-18.cs
   trunk/mcs/errors/cs0114-2.cs
   trunk/mcs/errors/cs0115-6.cs
   trunk/mcs/errors/cs0179-2.cs
   trunk/mcs/errors/cs0179-3.cs
   trunk/mcs/errors/cs0505-2.cs
   trunk/mcs/errors/cs0505-3.cs
   trunk/mcs/errors/cs0506-2.cs
   trunk/mcs/errors/cs0507-3.cs
   trunk/mcs/errors/cs0533-2.cs
   trunk/mcs/errors/cs0534-5.cs
   trunk/mcs/errors/cs0626-5.cs
   trunk/mcs/errors/cs0672-4.cs
   trunk/mcs/errors/cs1715-2.cs
Modified:
   trunk/mcs/errors/cs0072-2.cs
   trunk/mcs/errors/cs0072.cs
   trunk/mcs/errors/cs0115-2.cs
   trunk/mcs/errors/cs0115-3.cs
   trunk/mcs/errors/cs0115-4.cs
   trunk/mcs/errors/cs0115.cs
   trunk/mcs/errors/cs0266-14.cs
   trunk/mcs/errors/cs0626-2.cs
   trunk/mcs/errors/cs0626-3.cs
   trunk/mcs/errors/cs0626-4.cs
   trunk/mcs/errors/cs0626.cs
Log:
New tests based on bug #80368

Modified: trunk/mcs/errors/cs0072-2.cs
===================================================================
--- trunk/mcs/errors/cs0072-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0072-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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;

Modified: trunk/mcs/errors/cs0072.cs
===================================================================
--- trunk/mcs/errors/cs0072.cs  2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0072.cs  2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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;

Added: trunk/mcs/errors/cs0111-18.cs
===================================================================
--- trunk/mcs/errors/cs0111-18.cs       2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0111-18.cs       2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,8 @@
+// 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; } }
+}


Property changes on: trunk/mcs/errors/cs0111-18.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0114-2.cs
===================================================================
--- trunk/mcs/errors/cs0114-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0114-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,13 @@
+// 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;
+}


Property changes on: trunk/mcs/errors/cs0114-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0115-2.cs
===================================================================
--- trunk/mcs/errors/cs0115-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0115-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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 {

Modified: trunk/mcs/errors/cs0115-3.cs
===================================================================
--- trunk/mcs/errors/cs0115-3.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0115-3.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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
 

Modified: trunk/mcs/errors/cs0115-4.cs
===================================================================
--- trunk/mcs/errors/cs0115-4.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0115-4.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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 {

Added: trunk/mcs/errors/cs0115-6.cs
===================================================================
--- trunk/mcs/errors/cs0115-6.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0115-6.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,11 @@
+// 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


Property changes on: trunk/mcs/errors/cs0115-6.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0115.cs
===================================================================
--- trunk/mcs/errors/cs0115.cs  2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0115.cs  2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,5 +1,5 @@
-// 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 ()

Added: trunk/mcs/errors/cs0179-2.cs
===================================================================
--- trunk/mcs/errors/cs0179-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0179-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,14 @@
+// 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 { }
+       }
+}
+


Property changes on: trunk/mcs/errors/cs0179-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0179-3.cs
===================================================================
--- trunk/mcs/errors/cs0179-3.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0179-3.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,10 @@
+// CS0179: `Bar.Foo' cannot declare a body because it is marked extern
+// Line: 5
+
+class Bar {
+       extern int Foo {
+               set { }
+               get { }
+       }
+}
+


Property changes on: trunk/mcs/errors/cs0179-3.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0266-14.cs
===================================================================
--- trunk/mcs/errors/cs0266-14.cs       2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0266-14.cs       2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,3 +1,7 @@
+// 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 {

Added: trunk/mcs/errors/cs0505-2.cs
===================================================================
--- trunk/mcs/errors/cs0505-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0505-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,13 @@
+// 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() {}
+}
+


Property changes on: trunk/mcs/errors/cs0505-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0505-3.cs
===================================================================
--- trunk/mcs/errors/cs0505-3.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0505-3.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,13 @@
+// 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() {}
+}
+


Property changes on: trunk/mcs/errors/cs0505-3.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0506-2.cs
===================================================================
--- trunk/mcs/errors/cs0506-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0506-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,13 @@
+// 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;
+}
+


Property changes on: trunk/mcs/errors/cs0506-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0507-3.cs
===================================================================
--- trunk/mcs/errors/cs0507-3.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0507-3.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,13 @@
+// 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;
+}
+


Property changes on: trunk/mcs/errors/cs0507-3.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0533-2.cs
===================================================================
--- trunk/mcs/errors/cs0533-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0533-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,12 @@
+// 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;
+}


Property changes on: trunk/mcs/errors/cs0533-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0534-5.cs
===================================================================
--- trunk/mcs/errors/cs0534-5.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0534-5.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,12 @@
+// 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;
+}


Property changes on: trunk/mcs/errors/cs0534-5.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0626-2.cs
===================================================================
--- trunk/mcs/errors/cs0626-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0626-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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
 

Modified: trunk/mcs/errors/cs0626-3.cs
===================================================================
--- trunk/mcs/errors/cs0626-3.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0626-3.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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
 

Modified: trunk/mcs/errors/cs0626-4.cs
===================================================================
--- trunk/mcs/errors/cs0626-4.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0626-4.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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
 

Added: trunk/mcs/errors/cs0626-5.cs
===================================================================
--- trunk/mcs/errors/cs0626-5.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0626-5.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,13 @@
+// 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;
+}
+


Property changes on: trunk/mcs/errors/cs0626-5.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0626.cs
===================================================================
--- trunk/mcs/errors/cs0626.cs  2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0626.cs  2007-01-14 14:27:33 UTC (rev 70979)
@@ -1,4 +1,4 @@
-// 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
 

Added: trunk/mcs/errors/cs0672-4.cs
===================================================================
--- trunk/mcs/errors/cs0672-4.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs0672-4.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,14 @@
+// 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;
+}


Property changes on: trunk/mcs/errors/cs0672-4.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs1715-2.cs
===================================================================
--- trunk/mcs/errors/cs1715-2.cs        2007-01-14 14:26:26 UTC (rev 70978)
+++ trunk/mcs/errors/cs1715-2.cs        2007-01-14 14:27:33 UTC (rev 70979)
@@ -0,0 +1,17 @@
+// 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;
+}
+
+
+


Property changes on: trunk/mcs/errors/cs1715-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to