Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs1656-4.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 491fd7f3f1e1843627533d2d1b36cd010b34987f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// cs1656-4.cs: Cannot assign to `i' because it is a `foreach iteration variable'
// Line: 14

using System.Collections;

class Test {
	static IEnumerable foo () { return null; }

	static void Main ()
	{
		IEnumerable f = foo ();
		if (f != null)
			foreach (int i in f)
				i = 0;
	}
}