1 // PR c++/50852 2 3 template<int d> class A; 4 template<class T> struct B {typedef int K;typedef int L;}; 5 template<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 }; 10 template<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 }; 15 template class D<B<A<1> >,3>; 16