[mini] Fix test compiling when running !MOBILE
[mono.git] / mcs / errors / cs0612-6.cs
1 // CS0612: `E.GetEnumerator()' is obsolete
2 // Line: 22
3 // Compiler options: -warnaserror
4
5 using System.Collections;
6 using System;
7
8 class E : IEnumerable
9 {
10         [Obsolete]
11         public IEnumerator GetEnumerator ()
12         {
13                 throw new System.NotImplementedException ();
14         }
15 }
16
17 class C
18 {
19         public static void Main ()
20         {
21                 var e = new E ();
22                 foreach (var entry in e) {
23                 }
24         }
25 }