Merge branch 'master' of http://github.com/mono/mono
[mono.git] / mcs / errors / gcs1579.cs
1 // CS1579: foreach statement cannot operate on variables of type `Foo' because it does not contain a definition for `GetEnumerator' or is inaccessible\r
2 // Line: 12\r
3 \r
4 using System;\r
5 using System.Collections;\r
6 \r
7 public class Test\r
8 {\r
9         public static void Main ()\r
10         {\r
11                 Foo f = new Foo ();\r
12                 foreach (object o in f)\r
13                         Console.WriteLine (o);\r
14         }\r
15 }\r
16 \r
17 public class Foo\r
18 {\r
19         public Func<IEnumerator> GetEnumerator;\r
20 }\r