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