Author: marek
Date: 2006-10-31 15:13:34 -0500 (Tue, 31 Oct 2006)
New Revision: 67186
Added:
trunk/mcs/errors/cs0278.cs
Log:
New test.
Added: trunk/mcs/errors/cs0278.cs
===================================================================
--- trunk/mcs/errors/cs0278.cs 2006-10-31 20:12:25 UTC (rev 67185)
+++ trunk/mcs/errors/cs0278.cs 2006-10-31 20:13:34 UTC (rev 67186)
@@ -0,0 +1,31 @@
+// CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of
`enumerable' pattern. Method `Testing.ICustomEnumerable.GetEnumerator()' is
ambiguous with method `System.Collections.IEnumerable.GetEnumerator()'
+// Line: 28
+// Compiler options: -warnaserror -warn:2
+
+using System;
+using System.Collections;
+
+namespace Testing {
+ interface ICustomEnumerable {
+ IEnumerator GetEnumerator();
+ }
+
+ interface IMixedEnumerable : IEnumerable, ICustomEnumerable {}
+
+ class TestCollection : IMixedEnumerable {
+ IEnumerator IEnumerable.GetEnumerator() {
+ return null;
+ }
+
+ IEnumerator ICustomEnumerable.GetEnumerator() {
+ return null;
+ }
+ }
+
+ class Test {
+ public static void Main(string[] args) {
+ IMixedEnumerable c = new TestCollection();
+ foreach(object o in c) {}
+ }
+ }
+}
\ No newline at end of file
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches