Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2002-10-25 05:20:00 +0400
committerMiguel de Icaza <miguel@gnome.org>2002-10-25 05:20:00 +0400
commitf6f94c5f47e21b131855a3a49f4f7c2d153fb2c4 (patch)
tree2039269842c3b640e006fe513ceea93191c69f6d /mcs/tests/test-170.cs
parent7e7604e5afd4c16671f5349660cd3211a204070c (diff)
Add new test
svn path=/trunk/mcs/; revision=8535
Diffstat (limited to 'mcs/tests/test-170.cs')
-rw-r--r--mcs/tests/test-170.cs56
1 files changed, 56 insertions, 0 deletions
diff --git a/mcs/tests/test-170.cs b/mcs/tests/test-170.cs
new file mode 100644
index 00000000000..8413f5c97a8
--- /dev/null
+++ b/mcs/tests/test-170.cs
@@ -0,0 +1,56 @@
+//
+// base and properties test
+//
+using System;
+
+class X {
+ int val;
+
+ public virtual int prop {
+ get {
+ return val;
+ }
+
+ set {
+ val = value;
+ }
+ }
+
+ public int AAA {
+ set { }
+ }
+}
+
+class Y : X {
+ int val2 = 1;
+
+ public override int prop {
+ get {
+ return val2;
+ }
+
+ set {
+ val2 = value;
+ }
+ }
+
+ int A () {
+ if (base.prop != 0)
+ return 3;
+ base.prop = 10;
+
+ if (base.prop != 10)
+ return 2;
+
+ return 0;
+ }
+
+
+ static int Main ()
+ {
+ Y y = new Y ();
+
+ return y.A ();
+ }
+
+}