[mcs] Pending implementation of accessors cannot hide base implementation with differ...
[mono.git] / mcs / tests / test-318.cs
index c52e8ca5c812f875b59d26fa3a02f6d8d96d94ba..71439f79faa9c237fcf1fbf76ce187a9f0dd10aa 100644 (file)
@@ -1,9 +1,44 @@
 // This code must be compilable without any warning
-// Compiler options: -warnaserror -warn:4 -unsafe\r
-// Test of wrong CS0219 warning
+// Compiler options: -warnaserror -warn:4 -unsafe
+// Test of wrong warnings
 
-public class C {\r
-    \r
+using System;
+using System.ComponentModel;
+
+public class Ev
+{
+        object disposedEvent = new object ();
+        EventHandlerList Events = new EventHandlerList();
+                
+        public event EventHandler Disposed
+        {
+                add { Events.AddHandler (disposedEvent, value); }
+                remove { Events.RemoveHandler (disposedEvent, value); }
+        }
+
+        public void OnClick(EventArgs e)
+        {
+            EventHandler clickEventDelegate = (EventHandler)Events[disposedEvent];
+            if (clickEventDelegate != null) {
+                clickEventDelegate(this, e);
+            }
+        }
+}
+
+public interface EventInterface {
+       event EventHandler Event;
+}
+
+class Foo : EventInterface {
+       event EventHandler EventInterface.Event
+       {
+                       add { }
+                       remove { }
+       }
+}
+
+public class C {
+    
        public static void my_from_fixed(out int val)
        {
                val = 3;
@@ -13,19 +48,19 @@ public class C {
        {
                int year;
                my_from_fixed(out year);
-       }\r
-        \r
+       }
+        
        internal static int CreateFromString (int arg)
        {
                int major = 0;
                int number = 5;
 
                major = number;
-               number = -1;\r
+               number = -1;
                     
                return major;
-       }   \r
-        \r
+       }   
+        
         public unsafe double* GetValue (double value)
        {
                double d = value;