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:
authorBen Maurer <benm@mono-cvs.ximian.com>2004-03-29 05:14:22 +0400
committerBen Maurer <benm@mono-cvs.ximian.com>2004-03-29 05:14:22 +0400
commit5c47a80b0062768d54dc67a51a54c7710f04ceef (patch)
tree9b741bc46d515311bebbb1c620aba970188bf4ce /mcs/errors/cs1540-2.cs
parenta484159dae7f94f50bad52563c22d071f754f223 (diff)
test case
svn path=/trunk/mcs/; revision=24686
Diffstat (limited to 'mcs/errors/cs1540-2.cs')
-rw-r--r--mcs/errors/cs1540-2.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/mcs/errors/cs1540-2.cs b/mcs/errors/cs1540-2.cs
new file mode 100644
index 00000000000..95c6961b3c5
--- /dev/null
+++ b/mcs/errors/cs1540-2.cs
@@ -0,0 +1,23 @@
+// cs1540-2.cs : Cannot access protected member `A.X()' via a qualifier of type `B'; the qualifier must be of type `C' (or derived from it)
+// line: 21
+
+class A
+{
+ protected virtual void X ()
+ {
+ }
+}
+
+class B : A
+{
+}
+
+class C : A
+{
+ static B b = new B ();
+
+ static void M ()
+ {
+ b.X ();
+ }
+} \ No newline at end of file