[mcs] Allows shadowing of probing pattern variables
[mono.git] / mcs / errors / cs0136-6.cs
1 // CS0136: A local variable named `s' cannot be declared in this scope because it would give a different meaning to `s', which is already used in a `parent or current' scope to denote something else
2 // Line: 11
3
4 using System;
5
6 class X
7 {
8         void Test2 (object o)
9         {
10                 if (o is ValueType s) {
11                         if (o is long s) {
12                                 Console.WriteLine (s);
13                         }
14                 }
15         }
16 }