summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/using.C
blob: 30e22c067e69cbb95d535f715b569566719beb87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do compile }

struct X { };
struct Y { };
struct Z { };

struct Base {
  X f() { return X(); }
  Y f() const { return Y(); }
};

struct Derived : Base {
  using Base::f;
  Z f(int) { return Z(); }
};

int main()
{
  Derived d;
  X x = d.f();                  // { dg-bogus "Y" "" }
}