FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / scoping4.C
blob94a49bfc77a8c3752fd6fd8c1651d0dc4919c3fd
1 // PRMS Id: 4375
2 // Bug: g++ fails to keep track of nested typedefs properly.
3 // Build don't link:
5 class A {
6 public:
7   typedef char * Ptr;
8   Ptr s;
9   Ptr get_string();
10   A(Ptr string); // { s = string; };
13 class B {
14 public:
15   typedef A * Ptr;
16   Ptr a;
17   Ptr get_A();
18   B(Ptr a_ptr);
21 A::A(Ptr string) {              // gets bogus error - 
22   s = string;                   // gets bogus error - 
25 int main() {
26   A a("testing");
27   A *a_ptr;
28   B b(&a);
29   a_ptr = b.get_A();