1 /* Handle C++ scoping ('::') operators in ObjC message receivers gracefully. */
2 /* Author: Ziemowit Laski <zlaski@apple.com> */
6 #include <objc/Object.h>
14 static Derived *get_instance(int);
17 Derived *CxxClass::get_instance(int offs) {
21 @interface Derived: Object {
24 -(id)initWithValue:(int)val;
28 @implementation Derived
29 -(id)initWithValue:(int)val {
41 inst[1] = [[::Derived alloc] initWithValue:7];
42 inst[2] = [[Derived alloc] initWithValue:77];
44 r = [CxxClass::get_instance(2) derived_meth];
48 r = [CxxClass::get_instance(1) derived_meth];