2 // Tests for bug # 52427 -- property inhertance stuff.
3 // these tests are problems that cropped up while
4 // making the patch. We dont want to regress on these.
7 class A { public virtual int Blah { get { return 1; }
set {} }
}
10 public override int Blah { get { return 2; }
}
12 public static bool Test ()
14 // Make sure we see that set in A
18 if (b
.Blah
!= 2) return false;
19 if (b
.Blah
++ != 2) return false;
26 abstract class C { public abstract int Blah { get; set; }
}
27 class D
: C { public override int Blah { get { return 2; }
set {} }
}
30 // Make sure we see that there is actually a base
32 public override int Blah { get { return base.Blah; }
}
34 public static bool Test ()
38 if (e
.Blah
!= 2) return false;
39 if (e
.Blah
++ != 2) return false;
47 int this [int i
] { get; set; }
48 int Blah { get; set; }
52 int IBlah
.this [int i
] { get { return 1; }
set {} }
53 int IBlah
.Blah { get { return 1; }
set {} }
55 public int this [int i
] { get { return 2; }
set {} }
56 public int Blah { get { return 2; }
set {} }
58 public static bool Test ()
60 // Make sure we dont see a conflict between
61 // the explicit impl and the non interface version
64 if (f
.Blah
!= 2) return false;
65 if (f
.Blah
++ != 2) return false;
69 if (f
[1] != 2) return false;
70 if (f
[1] ++ != 2) return false;
78 public static int Main ()
80 if (! B
.Test ()) return 1;
81 if (! E
.Test ()) return 2;
82 if (! F
.Test ()) return 3;