mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If there is a method -foo: that's unavailable (for whatever reason), and we now have a method -foo:error: that we'd like to import, it's okay to drop the error parameter there. Overload resolution can handle filtering out the unavailable method. rdar://problem/21497221 Swift SVN r29746
52 lines
1.7 KiB
Objective-C
52 lines
1.7 KiB
Objective-C
/* -*- ObjC -*- */
|
|
|
|
@import Foundation;
|
|
|
|
@interface ErrorProne : NSObject
|
|
+ (BOOL) fail: (NSError**) error;
|
|
+ (BOOL) goAndReturnError: (NSError**) error;
|
|
+ (BOOL) tryAndReturnError: (NSError**) error;
|
|
|
|
+ (BOOL) messUpSignatureAndReturnError: (NSError*) error;
|
|
|
|
+ (BOOL) consume: (id) object error: (NSError**) error;
|
|
|
|
- (instancetype) initWithNewtonMessagePad: (NSString *) assistant;
|
|
- (instancetype) initWithNewtonMessagePad: (NSString *) assistant error: (NSError**) error;
|
|
|
|
- (instancetype) initWithOne: (nullable id) other error: (NSError**) error;
|
|
+ (instancetype) errorProneWithTwo: (nullable id) other error: (NSError**) error;
|
|
|
|
- (BOOL) conflict1;
|
|
- (BOOL) conflict1: (NSError**) error;
|
|
|
|
- (BOOL) conflict2;
|
|
- (BOOL) conflict2AndReturnError: (NSError**) error;
|
|
|
|
- (BOOL) conflict3: (id) object;
|
|
- (BOOL) conflict3: (id) object error: (NSError**) error;
|
|
|
|
+ (NSArray*) collectionWithCount: (NSInteger) i error: (NSError**) error;
|
|
|
|
+ (BOOL) runWithError: (NSError**) err callback: (void(^)(void)) block;
|
|
+ (BOOL) runWithError: (NSError**) err count: (NSInteger) n;
|
|
|
|
+ (BOOL) runWithAnError: (NSError**) err callback: (void(^)(void)) block;
|
|
+ (BOOL) runWithAnError: (NSError**) err count: (NSInteger) n;
|
|
|
|
+ (BOOL) runSwiftly: (NSInteger) speed error: (NSError**) err callback: (void(^)(void)) block;
|
|
|
|
- (BOOL) integrate: (NSInteger) spec code: (NSInteger) code error: (NSError**) err;
|
|
|
|
+ (void)doTheThing:(NSInteger)whichThing __attribute__((swift, unavailable));
|
|
+ (BOOL)doTheThing:(NSInteger)whichThing error:(NSError **)error;
|
|
@end
|
|
|
|
@interface ReallyErrorProne : ErrorProne
|
|
@end
|
|
|
|
@protocol ErrorProneProtocol
|
|
- (BOOL) obliterate: (NSError**) error;
|
|
- (BOOL) invigorate: (NSError**) error callback: (void(^)(void)) block;
|
|
@end
|