1 // PR c++/37140 2 3 struct X 4 { 5 typedef int nested_type; 6 }; 7 8 template <class T> 9 struct A 10 { 11 typedef X type; 12 }; 13 14 template <class T> 15 struct B : A<T> 16 { 17 using typename A<T>::type; 18 typename type::nested_type x; 19 }; 20 21 template <class T> 22 struct C : B<T> 23 { 24 using typename B<T>::type; 25 typename type::nested_type y; 26 }; 27 28 struct D : C<int> 29 { 30 using C<int>::type; 31 type::nested_type z; 32 }; 33 34