summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/friend6.C
blob: 05763d986b0b70b61f3e46a6e9f8fac156c8f0a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// Origin: Martin v. L�wis  <loewis@informatik.hu-berlin.de>
// Test for resolution of core issue 125.

struct A{
  struct B{};
};

A::B C();

namespace B{
  A C();
}

class Test{
  friend A (::B::C)();  // Ok
  friend A::B (::C)();  // Ok
  friend A::B::C();     // { dg-error "" } no A::B::C
};