2 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
3 /* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */
6 #include "../objc-obj-c++-shared/Object1.h"
8 typedef struct MyWidget {
12 MyWidget gWidget = { 17 };
18 @interface Foo: Object
21 @interface Bar: Foo <MyProto>
24 @interface Container: Object
25 + (MyWidget *)elementForView:(Foo *)view;
32 - (MyWidget *)widget {
37 @implementation Container
38 + (MyWidget *)elementForView:(Foo *)view
40 MyWidget *widget = (MyWidget *) nil;
41 if ([view conformsTo:@protocol(MyProto)]) {
42 widget = [(Foo <MyProto> *)view widget];
50 MyWidget *w = [Container elementForView: view];