Applied patch from Marek Safar: New error test files for MCS.
[mono.git] / mcs / errors / cs0609.cs
1 // cs0609.cs: Cannot set the name attribute on an indexer marked override\r
2 // Line: 14\r
3 using System.Runtime.CompilerServices;\r
4 \r
5 class BaseClass {\r
6         protected virtual bool this[int index] {\r
7                 get {\r
8                         return true;\r
9                 }\r
10         }\r
11 }\r
12 \r
13 class DerivedClass: BaseClass {\r
14         [IndexerName("Error")]\r
15         protected override int this[int index] {\r
16                 get {\r
17                         return false;\r
18                 }\r
19         }\r
20             \r
21         static void Main() {}\r
22 }\r
23 \r