1 // { dg-do compile } 2 3 // Copyright (C) 2001 Free Software Foundation, Inc. 4 // Contributed by Nathan Sidwell 9 Dec 2001 <nathan@nathan@codesourcery.com> 5 6 // PR 72 7 8 template <typename T> struct A 9 { 10 typedef T type; 11 }; 12 13 template <typename T> struct B 14 { 15 typedef int xxx; // { dg-message "" } 16 typedef T xxx; // { dg-error "" } 17 typedef typename A<T>::type xxx; // { dg-error "" } 18 typedef A<int>::type xxx; // { dg-error "" } 19 }; 20 21 B<int> good; 22