1 // { dg-do assemble } 2 // Copyright (C) 2000 Free Software Foundation, Inc. 3 // Contributed by Nathan Sidwell 10 Feb 2000 <nathan@acm.org> 4 5 // Test that access to static members from a nested class of the derived 6 // type works. 7 8 class Base 9 { 10 protected: 11 static int Some_var; 12 typedef int Some_t; 13 }; 14 15 class Derived : Base 16 { 17 protected: 18 struct Nested 19 { 20 void Foo (Some_t); BarNested21 void Bar (Base::Some_t) { Base::Some_var = 1; } 22 }; 23 }; 24 Foo(Some_t)25void Derived::Nested::Foo (Some_t) { 26 Some_var = 2; 27 } 28