1 /* Test protocol warning. */
2 /* Contributed by Devang Patel <dpatel@apple.com>. */
3 /* { dg-do compile } */
4 /* { dg-additional-options "-Wno-objc-root-class" } */
6 typedef struct objc_object { struct objc_class *class_pointer; } *id;
11 id <Bar> Foo_Bar () { }
21 MyStruct *_anotherData;
25 -(id) anotherDataSource;
26 -(id) my_method: (int) i;
30 -(id) anotherDataSource
32 return (id)_anotherData;
40 -(id) my_method: (int) i
42 id one = [self anotherDataSource];
45 // Do not issue warning about my_method not found in protocol
46 return [(one ? [self mainDataSource] : one) my_method:i];