1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
4 /* Test dot-syntax with accessors to be looked up in protocol @properties. */
8 #include <objc/runtime.h>
22 @interface MyRootClass
31 @interface MySubClass <ProtocolA, ProtocolB, ProtocolC>
34 int function (MySubClass *object, int x)
38 object.countC = object.countB;
43 int function2 (MyRootClass <ProtocolA, ProtocolB, ProtocolC> *object, int x)
47 object.countC = object.countB;
52 int function3 (MyRootClass <ProtocolA, ProtocolB> *object, int x)
56 object.countC = object.countB; /* { dg-error "request for member .countC. in" } */
58 return object.countC; /* { dg-error "request for member .countC. in" } */
61 int function4 (id <ProtocolA, ProtocolB, ProtocolC> object, int x)
65 object.countC = object.countB;
70 int function5 (id <ProtocolA, ProtocolB> object, int x)
74 object.countC = object.countB; /* { dg-error "request for member .countC. in" } */
76 return object.countC; /* { dg-error "request for member .countC. in" } */