blob: 0744889c40aa5bab6d3b59c4f053376efc982426 [file] [log] [blame]
/* APPLE LOCAL file radar 4994854 */
/* Check for continuation anonymous category and new property decl in it as well. */
/* { dg-options "-fobjc-new-property -mmacosx-version-min=10.5" } */
/* { dg-do run { target *-*-darwin* } } */
// Should compile cleanly
// Baseline "nil continuation":
@interface ToBeContinued
@end
@interface ToBeContinued()
@end
@implementation ToBeContinued
@end
// Add methods and properties:
@interface TwoStep
{
int x;
}
- (int)one;
@end
@interface TwoStep()
- (int)two;
@property int x;
@end
@implementation TwoStep
- (int)one { return 1; }
- (int)two { return 2; }
@synthesize x;
@end
// Multiple continuations:
@interface Trilogy
- (int)one;
@end
@interface Trilogy()
- (int)two;
@end
@interface Trilogy()
- (int)three;
@end
@implementation Trilogy
- (int)one { return 1; }
- (int)two { return 2; }
- (int)three { return 3; }
@end
// "Property extension" continuation:
@interface Immutable
{
int x;
}
@property(readonly) int x;
@end
@interface Immutable()
@property(readwrite) int x; // privately re-declare to have a public getter and a private setter
@end
@implementation Immutable
@synthesize x;
@end
int main (void) {return 0;}