Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
Fariborz Jahanian | 573acde | 2009-01-17 23:21:10 +0000 | [diff] [blame] | 2 | |
| 3 | @interface MyClass { |
Douglas Gregor | e6bf90a | 2011-01-05 01:10:06 +0000 | [diff] [blame] | 4 | int prop; |
Fariborz Jahanian | 573acde | 2009-01-17 23:21:10 +0000 | [diff] [blame] | 5 | }; |
| 6 | @property unsigned char bufferedUTF8Bytes[4]; // expected-error {{property cannot have array or function type}} |
| 7 | @property unsigned char bufferedUTFBytes:1; // expected-error {{property name cannot be a bitfield}} |
Fariborz Jahanian | e0097db | 2010-02-15 22:20:11 +0000 | [diff] [blame] | 8 | @property(nonatomic, retain, setter=ab_setDefaultToolbarItems) MyClass *ab_defaultToolbarItems; // expected-error {{method name referenced in property setter attribute must end with ':'}} |
Douglas Gregor | e6bf90a | 2011-01-05 01:10:06 +0000 | [diff] [blame] | 9 | |
| 10 | @property int prop; |
Fariborz Jahanian | 573acde | 2009-01-17 23:21:10 +0000 | [diff] [blame] | 11 | @end |
| 12 | |
| 13 | @implementation MyClass |
Douglas Gregor | e6bf90a | 2011-01-05 01:10:06 +0000 | [diff] [blame] | 14 | @dynamic ab_defaultToolbarItems // expected-error{{expected ';' after @dynamic}} |
| 15 | @synthesize prop // expected-error{{expected ';' after @synthesize}} |
Fariborz Jahanian | 573acde | 2009-01-17 23:21:10 +0000 | [diff] [blame] | 16 | @end |
| 17 | |