mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The `call` argument to `diagnoseDeclAsyncAvailability()` may be `nullptr` when the structure of the AST prevents `getEnclosingApplyExpr()` from finding the enclosing apply. The diagnostics implementation introduced with https://github.com/apple/swift/pull/60663 needs to tollerate this, similar to the rest of `diagnoseDeclAsyncAvailability()`. Resolves rdar://100862513
22 lines
935 B
Objective-C
22 lines
935 B
Objective-C
@import Foundation;
|
|
|
|
#pragma clang assume_nonnull begin
|
|
|
|
typedef void (^CompletionHandler)(NSInteger);
|
|
|
|
@interface HandlerTest : NSObject
|
|
-(void)simpleWithCompletionHandler:(void (^)(NSInteger))handler;
|
|
-(void)simpleArg:(NSInteger)arg completionHandler:(void (^)(NSInteger))handler;
|
|
-(void)aliasWithCompletionHandler:(CompletionHandler)handler;
|
|
-(void)errorWithCompletionHandler:(void (^)(NSString *_Nullable, NSError * _Nullable))handler;
|
|
-(BOOL)removedError:(NSError * _Nullable * _Nullable)error completionHandler:(void (^)(NSString *_Nullable, NSError * _Nullable))handler;
|
|
|
|
-(void)asyncImportSame:(NSInteger)arg completionHandler:(void (^)(NSInteger))handler;
|
|
-(void)asyncImportSame:(NSInteger)arg replyTo:(void (^)(NSInteger))handler __attribute__((swift_async(none)));
|
|
|
|
-(void)simpleOnMainActorWithCompletionHandler:(void (^)(NSInteger))handler __attribute__((swift_attr("@MainActor")));
|
|
|
|
@end
|
|
|
|
#pragma clang assume_nonnull end
|