[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / errors / cs0278.cs
1 // CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `Testing.ICustomEnumerable.GetEnumerator()'
2 // Line: 28
3 // Compiler options: -warnaserror -warn:2
4
5 using System;
6 using System.Collections;
7
8 namespace Testing {
9         interface ICustomEnumerable {
10                 IEnumerator GetEnumerator();
11         }
12
13         interface IMixedEnumerable : IEnumerable, ICustomEnumerable {}
14
15         class TestCollection : IMixedEnumerable {
16                 IEnumerator IEnumerable.GetEnumerator() {
17                         return null;
18                 }
19
20                 IEnumerator ICustomEnumerable.GetEnumerator()  {
21                         return null;
22                 }
23         }
24
25         class Test {
26                 public static void Main(string[] args) {
27                         IMixedEnumerable c = new TestCollection();
28                         foreach(object o in c) {}
29                 }
30         }
31 }