// { dg-do compile } // Copyright (C) 2007 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 21 Jul 2007 template struct A { struct B; typedef typename B::type type; }; template struct A::B { typedef typename A::type type; type Foo (); }; template typename A::B::type A::B::Foo () { return 0; }