Check in a motivating test for the revised access semantics.
llvm-svn: 100159
This commit is contained in:
parent
9af4e118c6
commit
cdf40bed1b
|
@ -56,4 +56,20 @@ namespace test2 {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace test3 {
|
||||||
|
class A {
|
||||||
|
protected: static int x;
|
||||||
|
};
|
||||||
|
|
||||||
|
class B : public A {};
|
||||||
|
class C : private A {
|
||||||
|
int test(B *b) {
|
||||||
|
// x is accessible at C when named in A.
|
||||||
|
// A is an accessible base of B at C.
|
||||||
|
// Therefore this succeeds.
|
||||||
|
return b->x;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: flesh out these cases
|
// TODO: flesh out these cases
|
||||||
|
|
Loading…
Reference in New Issue