2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / errors / cs1621.cs
1 // cs01621.cs: The yield statement cannot be used inside anonymous method blocks
2 // Line: 13
3
4 using System.Collections;
5
6 delegate object D ();
7
8 class C: IEnumerable
9 {
10    public IEnumerator GetEnumerator ()
11    {
12       D d = delegate {
13                 yield return this;
14                 return this;
15           };
16    }
17 }