[mcs] Allow properties and indexers of by-ref values to be set without setter
[mono.git] / mcs / errors / cs0136-4.cs
1 // CS0136: A local variable named `res' cannot be declared in this scope because it would give a different meaning to `res', which is already used in a `child' scope to denote something else
2 // Line: 15
3
4 class C
5 {
6         public void Foo (int i, int v)
7         {
8                 switch (i) {
9                         case 1:
10                                 if (v > 0) {
11                                         int res = 1;
12                                 }
13                                 break;
14                         case 2:
15                                 int res = 2;
16                                 break;
17                 }
18         }
19 }