for "build" config, import corlib common sources at unix instead (#11989)
[mono-project.git] / mcs / errors / cs1654.cs
blob6d6a28cb0b1e2a912ca02193bb04246814bd4e08
1 // CS1654: Cannot assign to members of `p' because it is a `foreach iteration variable'
2 // Line: 18
4 using System.Collections;
6 struct P {
7 public int x;
10 class Test {
11 static IEnumerable foo () { return null; }
13 static void Main ()
15 IEnumerable f = foo ();
16 if (f != null)
17 foreach (P p in f)
18 p.x = 0;