diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-10-04 13:40:13 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-10-04 15:49:36 +0300 |
commit | 135dbb9c6d6add208ac0d0f763319fa37ecd6c11 (patch) | |
tree | b752b869e42156572380f6d04807fb714f816605 /mcs/errors | |
parent | b683b3dc7473d0db665d1e5fa0efa2c4c807ab90 (diff) |
[mcs] Allows shadowing of probing pattern variables
Diffstat (limited to 'mcs/errors')
-rw-r--r-- | mcs/errors/cs0136-6.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mcs/errors/cs0136-6.cs b/mcs/errors/cs0136-6.cs new file mode 100644 index 00000000000..79fa771ff4d --- /dev/null +++ b/mcs/errors/cs0136-6.cs @@ -0,0 +1,16 @@ +// 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 +// Line: 11 + +using System; + +class X +{ + void Test2 (object o) + { + if (o is ValueType s) { + if (o is long s) { + Console.WriteLine (s); + } + } + } +}
\ No newline at end of file |