blob: 94a49bfc77a8c3752fd6fd8c1651d0dc4919c3fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// PRMS Id: 4375
// Bug: g++ fails to keep track of nested typedefs properly.
// Build don't link:
class A {
public:
typedef char * Ptr;
Ptr s;
Ptr get_string();
A(Ptr string); // { s = string; };
};
class B {
public:
typedef A * Ptr;
Ptr a;
Ptr get_A();
B(Ptr a_ptr);
};
A::A(Ptr string) { // gets bogus error -
s = string; // gets bogus error -
}
int main() {
A a("testing");
A *a_ptr;
B b(&a);
a_ptr = b.get_A();
}
|