2009-09-02 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0278.cs
blobfb6bc5b6bc9f5a77c639f8dacc0e08d0ef828c73
1 // CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of `enumerable' pattern. Method `Testing.ICustomEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.IEnumerable.GetEnumerator()'
2 // Line: 28
3 // Compiler options: -warnaserror -warn:2
5 using System;
6 using System.Collections;
8 namespace Testing {
9 interface ICustomEnumerable {
10 IEnumerator GetEnumerator();
13 interface IMixedEnumerable : IEnumerable, ICustomEnumerable {}
15 class TestCollection : IMixedEnumerable {
16 IEnumerator IEnumerable.GetEnumerator() {
17 return null;
20 IEnumerator ICustomEnumerable.GetEnumerator() {
21 return null;
25 class Test {
26 public static void Main(string[] args) {
27 IMixedEnumerable c = new TestCollection();
28 foreach(object o in c) {}