1// { dg-do assemble  }
2
3template <class T>
4struct A
5{
6  typedef T A_Type;
7};
8
9
10template <class U>
11struct B : public A<U>
12{
13  A_Type Func();		// { dg-error "does not name a type" "err" }
14  // { dg-message "note" "note" { target *-*-* } 13 }
15};
16
17template <class U>
18A<U>::A_Type B<U>::Func()       // { dg-error "typename" } function
19{
20} // { dg-error "expected" }
21