[w32file] Move MonoIO.Find{First,Next,Close} to managed
[mono.git] / mcs / errors / cs1655.cs
1 // CS1655: Cannot pass members of `q' as ref or out arguments because it is a `foreach iteration variable'
2 // Line: 23
3
4 using System.Collections;
5
6 struct P {
7         public int x;
8 }
9
10 struct Q {
11         public P p;
12 }
13
14 class Test {
15         static void bar (out int x) { x = 0; }
16         static IEnumerable foo () { return null; }
17
18         static void Main ()
19         {
20                 IEnumerable f = foo ();
21                 if (f != null)
22                         foreach (Q q in f)
23                                 bar (out q.p.x);
24         }
25 }