[mcs] Allows shadowing of probing pattern variables
[mono.git] / mcs / errors / cs0021-3.cs
index c2f43ca9ca8cd149ebe1829a2b5a3c5289067781..00124a3fc9c819619344dcbc493a748fb2afa291 100644 (file)
@@ -1,16 +1,11 @@
-// cs0021-2.cs: Cannot apply indexing with [] to an expression of type `Foo'
-// Line: 14
+// CS0021: Cannot apply indexing with [] to an expression of type `G'
+// Line: 8
 
-using System;
-       
-public class Foo {
-       private int this[int index] { get { return index; } }
-}
-       
-public class Bar {
-       public static void Main ()
+public class Foo<G>
+{
+       public static void Bar ()
        {
-               Foo foo = new Foo ();
-               Console.WriteLine (foo[5]);
+               int i = default (G)[0];
        }
 }
+