Improve support for Objective-C forward declarations

This commit is contained in:
Svyatoslav Scherbina
2017-10-20 16:29:39 +03:00
committed by SvyatoslavScherbina
parent 91ab69b835
commit 905390cd45
6 changed files with 69 additions and 36 deletions
+18 -4
View File
@@ -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;