codeowners update
[mono.git] / mcs / tests / test-170.cs
1 //
2 // base and properties test
3 //
4 using System;
5
6 class X {
7         int val;
8         
9         public virtual int prop {
10                 get {
11                         return val;
12                 }
13
14                 set {
15                         val = value;
16                 }
17         }
18
19         public int AAA {
20                 set { } 
21         }
22 }
23
24 class Y : X {
25         int val2 = 1;
26         
27         public override int prop {
28                 get {
29                         return val2;
30                 }
31
32                 set {
33                         val2 = value;
34                 }
35         }
36         
37         int A () {
38                 if (base.prop != 0)
39                         return 3;
40                 base.prop = 10;
41
42                 if (base.prop != 10)
43                         return 2;
44
45                 return 0;
46         }
47
48
49         public static int Main ()
50         {
51                 Y y = new Y ();
52
53                 return y.A ();
54         }
55         
56 }