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:
authorMarek Safar <marek.safar@gmail.com>2010-05-19 23:16:34 +0400
committerMarek Safar <marek.safar@gmail.com>2010-05-19 23:16:34 +0400
commit0bf95f4e2aae37d85d503f3ce949feafb66a8b5d (patch)
treefc20d109c45e8bcc5043d92b651d8fe78f8415a3 /mcs/tests/test-771.cs
parent4b46bdbd6f247d29ba37b8486ea787ac79fb12e0 (diff)
New tests.
svn path=/trunk/mcs/; revision=157573
Diffstat (limited to 'mcs/tests/test-771.cs')
-rw-r--r--mcs/tests/test-771.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/mcs/tests/test-771.cs b/mcs/tests/test-771.cs
new file mode 100644
index 00000000000..6deae7aa762
--- /dev/null
+++ b/mcs/tests/test-771.cs
@@ -0,0 +1,38 @@
+using System;
+
+namespace InternalAccess
+{
+ public abstract class Base
+ {
+ internal Base () { }
+ internal string Prop { get { return "A"; } }
+ }
+
+ public class DerivedInternalExample : Base
+ {
+ public DerivedInternalExample () { }
+ internal new string Prop { get { return "D"; } }
+ }
+
+ public class DerivedProtectedExample : Base
+ {
+ public DerivedProtectedExample () { }
+ protected new string Prop { get { return "E"; } }
+ }
+
+ class MainClass
+ {
+ public static int Main ()
+ {
+ DerivedInternalExample die = new DerivedInternalExample ();
+ if (die.Prop != "D")
+ return 1;
+
+ DerivedProtectedExample dpe = new DerivedProtectedExample ();
+ if (dpe.Prop != "A")
+ return 2;
+
+ return 0;
+ }
+ }
+}