1 // { dg-do compile }
2 
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 15 Aug 2003 <nathan@codesourcery.com>
5 
6 // checked required bases in wrong scope.
7 
8 class Helper {};
9 
10 template<class T> struct X { };
11 
12 template<class T> class Base
13 {
14   protected:
15   typedef Helper H;
16 };
17 
18 template<class T >
19 struct Derived : Base<T>
20 {
21   typedef Base<T> Parent;
22   typedef typename Parent::H H;
23 
24   class Nested : public X<H> {};
25 
26   Nested m;
27 
28   void Foo ();
29 };
30 
Foo(Derived<char> & x)31 void Foo (Derived<char> &x)
32 {
33   x.Foo ();
34 }
35