Files
swift-mirror/test/Inputs/clang-importer-sdk/usr/include/errors.h
John McCall 9638611277 Use AbstractionPattern to find Clang types for inputs and
results when finding bridged types, rather than reinventing
(well, pre-inventing) the same thing elsewhere.

Doing this apparently forces AbstractionPattern to deal
with ObjC protocol methods for the first time, which are
generic and therefore require even the Clang-based
abstraction patterns to propagate generic signatures.

Use this infrastructure to allow foreign error conventions
to suppress the wrapping of nonnull bridged collection results
in a level of optionality.  We can't treat nil results as
an empty collection while simultaneously treating them as
an error signal.

Swift SVN r28022
2015-05-01 04:38:17 +00:00

20 lines
544 B
Objective-C

/* -*- ObjC -*- */
@import Foundation;
@interface ErrorProne : NSObject
+ (BOOL) fail: (NSError**) error;
+ (BOOL) goAndReturnError: (NSError**) error;
+ (BOOL) tryAndReturnError: (NSError**) error;
+ (BOOL) consume: (id) object error: (NSError**) error;
- (instancetype) initWithOne: (nullable id) other error: (NSError**) error;
+ (instancetype) errorProneWithTwo: (nullable id) other error: (NSError**) error;
+ (NSArray*) collectionWithCount: (NSInteger) i error: (NSError**) error;
@end
@interface ReallyErrorProne : ErrorProne
@end