Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Fariborz Jahanian | e793a6e | 2008-11-24 22:16:00 +0000 | [diff] [blame] | 3 | |
| 4 | |
| 5 | @interface Object |
Steve Naroff | 6b9dfd4 | 2009-03-04 15:11:40 +0000 | [diff] [blame] | 6 | + (id) new; |
Fariborz Jahanian | e793a6e | 2008-11-24 22:16:00 +0000 | [diff] [blame] | 7 | @end |
| 8 | |
| 9 | @protocol GCObject |
| 10 | @property int class; |
| 11 | @end |
| 12 | |
| 13 | @protocol DerivedGCObject <GCObject> |
| 14 | @property int Dclass; |
| 15 | @end |
| 16 | |
| 17 | @interface GCObject : Object <DerivedGCObject> { |
| 18 | int ifield; |
| 19 | int iOwnClass; |
| 20 | int iDclass; |
| 21 | } |
| 22 | @property int OwnClass; |
| 23 | @end |
| 24 | |
| 25 | @implementation GCObject : Object |
| 26 | @synthesize class=ifield; |
| 27 | @synthesize Dclass=iDclass; |
| 28 | @synthesize OwnClass=iOwnClass; |
| 29 | @end |
| 30 | |
| 31 | int main(int argc, char **argv) { |
| 32 | GCObject *f = [GCObject new]; |
| 33 | f.class = 5; |
| 34 | f.Dclass = 1; |
| 35 | f.OwnClass = 3; |
| 36 | return f.class + f.Dclass + f.OwnClass - 9; |
| 37 | } |