Anders Carlsson | 00165a2 | 2008-12-19 17:27:57 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | // PR3234 | ||||
4 | |||||
5 | @protocol NSCopying @end | ||||
6 | @interface NSObject @end | ||||
7 | |||||
8 | void f1(NSObject *o) | ||||
9 | { | ||||
10 | o.foo; // expected-error{{property 'foo' not found on object of type 'NSObject *'}} | ||||
11 | } | ||||
12 | |||||
13 | void f2(id<NSCopying> o) | ||||
14 | { | ||||
15 | o.foo; // expected-error{{property 'foo' not found on object of type 'id<NSCopying>'}} | ||||
16 | } | ||||
17 | |||||
18 | void f3(id o) | ||||
19 | { | ||||
20 | o.foo; // expected-error{{member reference base type 'id' is not a structure or union}} | ||||
21 | } | ||||
22 |