mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, the function emitCBridgedToNativeValue handled three situations around optionals: - Bridged?, Native? - Bridged, Native? - Bridged, Native Here, handling for the fourth case - Bridged?, Native is added. To enable this, the number of Optional wrappings that the bridged type has that the native type does not is passed in to the function. Then, in the portions of the function where actual transformations are done, the values are unwrapped an appropriate number of times. Mostly that means force unwrapping N times before doing the transformation. In the case of types that conform to _ObjectiveCBridgeable, however, it means force unwrapping the value N-1 times after doing the transformation because _ObjectiveCBridgeable._unconditionallyBridgeFromObjectiveC performs one layer of unwrapping itself. rdar://81590807
30 lines
1.3 KiB
Objective-C
30 lines
1.3 KiB
Objective-C
#include <Foundation/Foundation.h>
|
|
|
|
#pragma clang assume_nonnull begin
|
|
|
|
@interface PFXObject : NSObject {
|
|
}
|
|
- (void)continuePassSyncWithCompletionHandler:(void (^)(void (^_Nullable)(void),
|
|
NSError *_Nullable,
|
|
BOOL))completionHandler
|
|
__attribute__((swift_async_error(zero_argument, 3)));
|
|
- (void)continuePassAsyncWithCompletionHandler:
|
|
(void (^)(void (^_Nullable)(void), NSError *_Nullable,
|
|
BOOL))completionHandler
|
|
__attribute__((swift_async_error(zero_argument, 3)));
|
|
- (void)continueFailSyncWithCompletionHandler:(void (^)(void (^_Nullable)(void),
|
|
NSError *_Nullable,
|
|
BOOL))completionHandler
|
|
__attribute__((swift_async_error(zero_argument, 3)));
|
|
- (void)continueFailAsyncWithCompletionHandler:
|
|
(void (^)(void (^_Nullable)(void), NSError *_Nullable,
|
|
BOOL))completionHandler
|
|
__attribute__((swift_async_error(zero_argument, 3)));
|
|
- (void)continueIncorrectWithCompletionHandler:
|
|
(void (^)(void (^_Nullable)(void), NSError *_Nullable,
|
|
BOOL))completionHandler
|
|
__attribute__((swift_async_error(zero_argument, 3)));
|
|
@end
|
|
|
|
#pragma clang assume_nonnull end
|