1 /* Test protocol warning. */
2 /* Contributed by Devang Patel <dpatel@apple.com>. */
3 /* { dg-do compile } */
5 typedef struct objc_object { struct objc_class *class_pointer; } *id;
10 id <Bar> Foo_Bar () { }
20 MyStruct *_anotherData;
24 -(id) anotherDataSource;
25 -(id) my_method: (int) i;
29 -(id) anotherDataSource
31 return (id)_anotherData;
39 -(id) my_method: (int) i
41 id one = [self anotherDataSource];
44 // Do not issue warning about my_method not found in protocol
45 return [(one ? [self mainDataSource] : one) my_method:i];