forked from OSchip/llvm-project
parent
8a1810f06b
commit
bf65ce5372
|
@ -0,0 +1,13 @@
|
|||
// RUN: clang -fsyntax-only -verify %s
|
||||
|
||||
@interface A
|
||||
-(int) x;
|
||||
@property (readonly) int x;
|
||||
@property int ok;
|
||||
@end
|
||||
|
||||
void f0(A *a) {
|
||||
a.x = 10; // expected-error {{assigning to property with 'readonly' attribute not allowed}}
|
||||
a.ok = 20;
|
||||
}
|
||||
|
Loading…
Reference in New Issue