search.c (lookup_base_r): Don't clear is_non_public just because we found a friendly scope.

* search.c (lookup_base_r): Don't clear is_non_public just because
        we found a friendly scope.

From-SVN: r50143
This commit is contained in:
Jason Merrill 2002-02-28 10:46:31 -05:00
parent 07f521fc06
commit 28dc79bca6
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// Test that a base doesn't get special rights to convert to itself.
struct A {
void f ();
};
struct B: private A { };
B b;
void A::f ()
{
A* ap = &b; // { dg-error "base|inherit" "" }
}