Improve support for Objective-C forward declarations
This commit is contained in:
committed by
SvyatoslavScherbina
parent
91ab69b835
commit
905390cd45
@@ -1,13 +1,22 @@
|
||||
#import <objc/NSObject.h>
|
||||
|
||||
@protocol Printer
|
||||
@required
|
||||
-(void)print:(const char*)string;
|
||||
@class Foo;
|
||||
|
||||
@protocol Printer;
|
||||
@protocol Printer;
|
||||
|
||||
@protocol Empty
|
||||
@end;
|
||||
|
||||
@protocol Forward;
|
||||
@class Forward;
|
||||
|
||||
void useForward1(Forward * p) {}
|
||||
void useForward2(id<Forward> p) {}
|
||||
|
||||
typedef NSString NSStringTypedef;
|
||||
|
||||
@interface Foo : NSObject
|
||||
@interface Foo : NSObject <Empty>
|
||||
@property NSStringTypedef* name;
|
||||
-(void)helloWithPrinter:(id <Printer>)printer;
|
||||
@end;
|
||||
@@ -16,6 +25,11 @@ typedef NSString NSStringTypedef;
|
||||
-(void)hello;
|
||||
@end;
|
||||
|
||||
@protocol Printer
|
||||
@required
|
||||
-(void)print:(const char*)string;
|
||||
@end;
|
||||
|
||||
@protocol MutablePair
|
||||
@required
|
||||
@property (readonly) int first;
|
||||
|
||||
Reference in New Issue
Block a user