1// PR c++/50852 2 3template<int d> class A; 4template<class T> struct B {typedef int K;typedef int L;}; 5template<class U,class V> struct C 6{ 7 typedef typename U::L X; 8 typedef A<X::a-1> W; // { dg-error "not a member" } 9}; 10template<class U,int d> struct D 11{ 12 typedef typename U::L X; 13 typedef A<X::a-1> W; // the error should really be on this line 14}; 15template class D<B<A<1> >,3>; 16