// { dg-do compile } // Copyright (C) 2003 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 15 Aug 2003 // checked required bases in wrong scope. class Helper {}; template struct X { }; template class Base { protected: typedef Helper H; }; template struct Derived : Base { typedef Base Parent; typedef typename Parent::H H; class Nested : public X {}; Nested m; void Foo (); }; void Foo (Derived &x) { x.Foo (); }