1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
4 /* Test that protocol qualifiers are maintained correctly when a
5 @class is replaced by its @interface. */
15 static MyClass <MyProtocol> *object1;
16 static MyClass *object2;
18 /* Declarating the @interface now will need to update all the existing
19 ObjC types referring to MyClass with the new information. We need
20 to test that protocol information is not lost in the process. */
26 [object1 method]; /* Ok */
27 [object2 method]; /* { dg-warning ".MyClass. may not respond to ..method." } */
28 /* { dg-warning "without a matching method" "" { target *-*-* } .-1 } */
29 /* { dg-warning "will be assumed to return" "" { target *-*-* } .-2 } */
30 /* { dg-warning "as arguments" "" { target *-*-* } .-3 } */