Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-named-01.cs
1 using System;
2
3 class A
4 {
5         public int Index;
6         
7         public A ()
8                 : this (x : 0)
9         {
10         }
11         
12         protected A (object x)
13         {
14         }
15         
16         public virtual int this [int i] {
17                 set {
18                         Index = value;
19                 }
20         }
21 }
22
23 class B : A
24 {
25         public B ()
26                 : base (x : "x")
27         {
28         }
29         
30         public override int this [int i] {
31                 set {
32                         base [i : i] = value + 4;
33                 }
34         }
35 }
36
37 class XAttribute:Attribute
38 {
39         public XAttribute (int h)
40         {
41         }
42 }
43
44 [X (h : 3)]
45 class M
46 {
47         static void Foo (int a)
48         {
49         }
50         
51         public static int Main ()
52         {
53                 Foo (a : -9);
54                 
55                 B b = new B ();
56                 b [8] = 5;
57                 if (b.Index != 9)
58                         return 1;
59                 
60                 Console.WriteLine ("ok");
61                 return 0;
62         }
63 }