summaryrefslogtreecommitdiff
path: root/test/SemaObjC/property-in-class-extension.m
blob: af68a43f02cbc637808e1a8d3c88b4389f1fb7c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1  -fsyntax-only -verify %s
// rdar://7766184

@interface Foo @end

@interface Foo ()
  @property (readonly) int bar;
@end

void FUNC () {
    Foo *foo;
    foo.bar = 0; // expected-error {{assigning to property with 'readonly' attribute not allowed}}
}