[corlib] Implement FieldInfo.SetValueDirect ().
[mono.git] / mcs / errors / cs0229-2.cs
index 4f9d856c586f273e0e1800021766d27a2e29cc50..a52270fcaa05a51f0bb566f3e2bf7116eb846e47 100644 (file)
@@ -1,32 +1,28 @@
-// cs0229.cs: Ambiguity between `IList.Count' and `ICounter.Count (int)'
-// Line: 30
+// CS0229: Ambiguity between `IList.Test' and `ICounter.Test'
+// Line: 26
+
 using System;
 
-interface IList {
-       int Count { get; set; }
-}
+delegate void Foo ();
 
-interface ICounter {
-       void Count (int i);
+interface IList 
+{
+       event Foo Test;
 }
 
-interface IListCounter: IList, ICounter {}
+interface ICounter 
+{
+       event Foo Test;
+}
 
+interface IListCounter: IList, ICounter
+{
+}
 
-class ListCounter : IListCounter {
-       int IList.Count {
-               get { Console.WriteLine ("int IList.Count.get"); return 1; }
-               set { Console.WriteLine ("int IList.Count.set"); }
-       }
-       
-       void ICounter.Count (int i)
-       {
-               Console.WriteLine ("int ICounter.Count (int i)");
-       }
-       
-       static void Main ()
+class Test
+{
+       static void Foo (IListCounter t)
        {
-               IListCounter t = new ListCounter ();
-               t.Count = 1;
+               t.Test += null;
        }
 }
\ No newline at end of file