summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/typename11.C
blob: a79e6d88708e7b4728b8d8acae8f3ce340072e41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/11987

template <int dim> struct X {
  struct I { I(); };
};

template <int dim> struct Y : X<dim> {
  typedef typename X<dim>::I I;
};

// note: I is nested type in X, not Y!
template <int dim>
Y<dim>::I::I () {}		// { dg-error "dependent typedef" }
// { dg-error "no type|dependent type" "" { target *-*-* } 13 }

template struct Y<1>;