summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/friend9.C
blob: caf685c3eced4e43ad4e84554065575e68521102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/25492

class Base {
public:
  class Nested {};
};

class Derived:public Base {
public:
  class Nested {
  public:
    void m();
  };
  class AnotherNested {
    friend class Nested;
    AnotherNested() {}
  };
};

void Derived::Nested::m() {
  Derived::AnotherNested instance;

}