Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tests / gtest-302.cs
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4
5 interface ITest : IEnumerable<int> {
6 }
7
8 class Test : ITest {
9         IEnumerator IEnumerable.GetEnumerator () { throw new Exception (); }
10         IEnumerator<int> IEnumerable<int>.GetEnumerator () { yield break; }
11 }
12
13 class M {
14         public static void Main ()
15         {
16                 ITest foo = new Test ();
17                 foreach (int i in foo)
18                         Console.WriteLine (i);
19         }
20 }