Fariborz Jahanian | 2514a30 | 2009-12-15 23:59:41 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | |||||
3 | typedef struct NSSize { | ||||
4 | int width; | ||||
5 | struct { | ||||
6 | int dim; | ||||
7 | } inner; | ||||
8 | } NSSize; | ||||
9 | |||||
10 | @interface Foo { | ||||
11 | NSSize _size; | ||||
12 | } | ||||
13 | @property NSSize size; | ||||
14 | @end | ||||
15 | |||||
16 | void foo() { | ||||
17 | Foo *f; | ||||
18 | f.size.width = 2.2; // expected-error {{cannot assign to a sub-structure of an ivar using property assignment syntax}} | ||||
19 | f.size.inner.dim = 200; // expected-error {{cannot assign to a sub-structure of an ivar using property assignment syntax}} | ||||
20 | } |