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