mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
24 lines
374 B
Objective-C
24 lines
374 B
Objective-C
#import "Escaper.h"
|
|
|
|
#import "DangerousEscaper.h"
|
|
|
|
@interface Escaper () <DangerousEscaper>
|
|
-(void)mightBeNaughty:(void (^)(void))completion;
|
|
@end
|
|
|
|
@implementation Escaper
|
|
|
|
- (id)init {
|
|
if ((self = [super init]) != nil) {
|
|
self.escape = ^{};
|
|
}
|
|
return self;
|
|
}
|
|
|
|
-(void)mightBeNaughty:(void (^)(void))completion {
|
|
self.escape = completion;
|
|
completion();
|
|
}
|
|
|
|
@end
|