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

cs0136-14.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c43a20519d6fabb019ee1dc815579707c30afa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// CS0136: A local variable named `i' cannot be declared in this scope because it would give a different meaning to `i', which is already used in a `child' scope to denote something else
// Line: 15
delegate string Fun ();

class X
{
	static void Main ()
	{
		for (int j = 0; j < 5; j++) {
			Fun m = delegate {
				int i = j;
				return "<<" + i + ">>";
			};

			int i = j;
		}
	}
}