Updated with review feedback.
[mono.git] / mcs / errors / cs1540-17.cs
1 // CS1540: Cannot access protected member `A.Foo()' via a qualifier of type `D2'. The qualifier must be of type `D' or derived from it
2 // Line: 8
3 // Compiler options: -r:CS1540-17-lib.dll
4
5 class D : B
6 {
7         public void Test ()
8         {
9                 C.Get().Foo ();
10         }
11 }
12
13 class D2 : B
14 {
15 }
16
17 class B : A
18 {
19 }
20
21 class C
22 {
23         public static D2 Get ()
24         {
25                 return new D2 ();
26         }
27 }