1 /* { dg-do compile } */
7 @property(readonly) int count;
10 @implementation NSArray
14 void foo (NSArray *ans[], id pid, id apid[], int i) {
16 test.count = 1; /* { dg-error "'readonly' property cannot be set" } */
17 ((NSArray *)pid).count = 1; /* { dg-error "'readonly' property cannot be set" } */
18 ((NSArray *)apid[i]).count = 1; /* { dg-error "'readonly' property cannot be set" } */
19 ans[i].count = 3; /* { dg-error "'readonly' property cannot be set" } */