Files
swift-mirror/test/decl/ext/Inputs/objc_implementation_async_availability.h
Xi Ge aeb43916cd [ClangImporter] Don't let imported OS availability suppress a method's async alternative clue. rdar://175355488
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.
2026-07-06 16:15:48 -07:00

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