aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename16.C
blob: 34021950da0c084a4dbb383c2d0cabedf1407ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// { dg-do link  }
// { dg-options "-Wno-deprecated" }

struct B {
  typedef int I;
};

template <class T>
struct D1 : public B {
};

template <class T>
struct D2 : public D1<T> {
  I i;  // { dg-error "" } not a type
};

template <>
struct D1<int> {
  typedef double I;
};

template <class T>
void f(T);
template <>
void f(double) {}

int main()
{
  D2<int> d2i;
  f(d2i.i); // { dg-error "" } no member i
}