2 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5 #include "../objc-obj-c++-shared/Object1.h"
7 typedef struct MyWidget {
11 MyWidget gWidget = { 17 };
17 @interface Foo: Object
20 @interface Bar: Foo <MyProto>
23 @interface Container: Object
24 + (MyWidget *)elementForView:(Foo *)view;
31 - (MyWidget *)widget {
36 @implementation Container
37 + (MyWidget *)elementForView:(Foo *)view
39 MyWidget *widget = (MyWidget *) nil;
40 if ([view conformsTo:@protocol(MyProto)]) {
41 widget = [(Foo <MyProto> *)view widget];
49 MyWidget *w = [Container elementForView: view];
57 #include "../objc-obj-c++-shared/Object1-implementation.h"