mirror of
https://github.com/apple/swift.git
synced 2026-10-10 13:50:43 +02:00
A completion-handler method carrying an availability attribute was skipped when wiring the rename attribute that points to its async alternative, so an async @objc @implementation member could not match its completion-handler requirement and no ObjC thunk was generated as a result. This narrows the guard to methods that already carry a rename, checking their availability attributes syntactically. Resolving the async alternative here would trigger name lookup and re-enter member loading while the nominal is still importing, corrupting its member lookup table.
19 lines
488 B
Objective-C
19 lines
488 B
Objective-C
#if __OBJC__
|
|
|
|
@import Foundation;
|
|
|
|
@protocol Widget
|
|
@end
|
|
|
|
@interface WidgetStore : NSObject
|
|
|
|
// A completion-handler method that also carries an availability attribute. The
|
|
// importer must still expose its async alternative so an async
|
|
// '@objc @implementation' member can match it.
|
|
- (void)fetchWidgetsWithCompletionHandler:(void (^ _Nonnull)(NSArray<id<Widget>> * _Nonnull widgets))completionHandler
|
|
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
|
|
@end
|
|
|
|
#endif
|