File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2950,7 +2950,7 @@ class ObjCImplementationChecker {
2950
2950
if (auto func = dyn_cast<AbstractFunctionDecl>(req)) {
2951
2951
auto asyncFunc = func->getAsyncAlternative ();
2952
2952
2953
- if (auto asyncAccessor = dyn_cast <AccessorDecl>(asyncFunc))
2953
+ if (auto asyncAccessor = dyn_cast_or_null <AccessorDecl>(asyncFunc))
2954
2954
return asyncAccessor->getStorage ();
2955
2955
2956
2956
return asyncFunc;
Original file line number Diff line number Diff line change 94
94
- (void )doSomethingAsynchronousWithCompletionHandler : (void (^ _Nonnull)(id _Nullable result, NSError * _Nullable error))completionHandler ;
95
95
- (void )doSomethingElseAsynchronousWithCompletionHandler : (void (^ _Nullable)(id _Nonnull result))completionHandler ;
96
96
- (void )doSomethingFunAndAsynchronousWithCompletionHandler : (void (^ _Nonnull)(id _Nullable result, NSError * _Nullable error))completionHandler ;
97
+
98
+ - (void )doSomethingOverloadedWithCompletionHandler : (void (^ _Nonnull)())completionHandler ;
99
+ - (void )doSomethingOverloaded __attribute__((__swift_attr__(" @_unavailableFromAsync(message: \" Use async doSomethingOverloaded instead.\" )" )));
97
100
@end
98
101
99
102
@protocol PartiallyOptionalProtocol
Original file line number Diff line number Diff line change @@ -312,6 +312,14 @@ protocol EmptySwiftProto {}
312
312
313
313
public func doSomethingFunAndAsynchronous( completionHandler: @escaping ( Any ? , Error ? ) -> Void ) {
314
314
}
315
+
316
+ @available ( SwiftStdlib 5 . 1 , * )
317
+ @objc ( doSomethingOverloadedWithCompletionHandler: )
318
+ public func doSomethingOverloaded( ) async { }
319
+
320
+ @available ( * , noasync)
321
+ @objc ( doSomethingOverloaded)
322
+ public func doSomethingOverloaded( ) { }
315
323
}
316
324
317
325
@_objcImplementation ( Conformance) extension ObjCClass {
You can’t perform that action at this time.
0 commit comments