1 /* Test assignments and comparisons involving `one-off' protocols. */
2 /* Author: Nicola Pero <nicola@brainstorm.co.uk>. */
3 /* { dg-do compile } */
16 id <MyProtocol> obj_p = nil;
17 MyClass<MyProtocol> *obj_cp = nil;
19 obj_cp = obj; /* Ok */
20 obj = obj_cp; /* Ok */
22 obj_cp = obj_p; /* Ok */
23 obj_p = obj_cp; /* Ok */
25 if (obj_cp == obj) ; /* Ok */
26 if (obj == obj_cp) ; /* Ok */
28 if (obj_cp == obj_p) ; /* Ok */
29 if (obj_p == obj_cp) ; /* Ok */