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 [EMAIL PROTECTED]

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

--- shadow/80408        2006-12-30 12:54:54.000000000 -0500
+++ shadow/80408.tmp.19479      2006-12-30 12:54:54.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 80408
+Product: Mono: Compilers
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS0278 reported when hiding method in interface
+
+When a given method from an interface hides the IEnumerable.GetEnumerator 
+method, and another interface implements that interface, then mcs reports 
+CS0278.
+
+To reproduce, compile the following code snippet:
+
+using System;
+using System.Collections;
+
+public class Test
+{
+  public void Execute ()
+  {
+    TestCollection a = null;
+    foreach (object x in a) {
+      Console.WriteLine (x);
+    }
+  }
+}
+
+interface ITestCollection : IEnumerable
+{
+  new IEnumerator GetEnumerator ();
+}
+
+interface TestCollection : ITestCollection
+{
+}
+
+Expected result:
+
+Successful compilation.
+
+Actual result:
+
+test.cs(9,3): warning CS0278: `TestCollection' contains ambiguous 
+implementation of `enumerable' pattern. Method 
+`System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method 
+`ITestCollection.GetEnumerator()'
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to