2 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
3 #include "../objc-obj-c++-shared/TestsuiteObject.m"
9 MyWidget(void) { a = 17; }
18 @interface Foo: TestsuiteObject
21 @interface Bar: Foo <MyProto>
24 @interface Container: TestsuiteObject
25 + (MyWidget *)elementForView:(Foo *)view;
32 - (MyWidget *)widget {
37 @implementation Container
38 + (MyWidget *)elementForView:(Foo *)view
41 if (class_conformsToProtocol (object_getClass (view),
42 @protocol(MyProto))) {
43 widget = [(Foo <MyProto> *)view widget];
51 MyWidget *w = [Container elementForView: view];