1 /* Test for handling of protocol hierarchies. */
2 /* Author: Ziemowit Laski <zlaski@apple.com>. */
3 /* { dg-do compile } */
5 /* One-line substitute for objc/objc.h */
6 typedef struct objc_object { struct objc_class *class_pointer; } *id;
13 - (void)someOtherMethod;
16 @interface NSObject <NSObj>
20 @implementation NSObject
24 @protocol Booing <NSObj>
28 @interface Boo: NSObject <Booing> // protocol has only one parent
35 @protocol Fooing <NSCopying, NSObj> // Fooing has two parent protocols
39 @interface Foo: NSObject <Fooing>
44 - (void)someOtherMethod {}
48 id<Booing, Fooing> stupidVar;
51 [stupidVar anotherMsg]; /* { dg-warning ".\\-anotherMsg. not found in protocol" } */
52 /* { dg-warning "no .\\-anotherMsg. method found" "" { target *-*-* } .-1 } */
56 /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
57 /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
58 /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */