Fariborz Jahanian | a82663a | 2008-11-22 18:40:47 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | @interface A | ||||
4 | -(int) x; | ||||
5 | @property (readonly) int x; | ||||
6 | @property int ok; | ||||
7 | @end | ||||
8 | |||||
9 | void f0(A *a) { | ||||
10 | a.x = 10; // expected-error {{assigning to property with 'readonly' attribute not allowed}} | ||||
11 | a.ok = 20; | ||||
12 | } | ||||
13 |