1 /* Test forward-decls for @protocols. */
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;
12 - (id <Bar>)someMethod;
13 - (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
17 - (id <Foo>)someOtherMethod;
18 - (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
19 - (id <Boo>)yetAnotherMethod;
22 /* The following worthy test is stubbed out until we can get the
23 harness to match correctly on the "compilation terminated" message
24 when running on GNU/Linux. sts 2001-08-01 */
26 @protocol Boo <Bar> /* { /*dg*/-error "has circular dependency" } */