Check in a motivating test for the revised access semantics.

llvm-svn: 100159
This commit is contained in:
John McCall 2010-04-02 00:11:49 +00:00
parent 9af4e118c6
commit cdf40bed1b
1 changed files with 16 additions and 0 deletions

View File

@ -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