mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The change in #59479 inadvertently fixed another bug in selector conflict checking: Swift did not notice when an ObjC header declared an async-imported method, but a Swift extension to the same class added another method with the same selector. Unfortunately, fixing this bug was source-breaking, and it also caused Swift to diagnose spurious conflicts between the various names that a single ObjC method might be imported with. Soften the error to a warning in Swift 5 mode and suppress the spurious diagnostics. Fixes rdar://95887113.
31 lines
739 B
Objective-C
31 lines
739 B
Objective-C
#ifndef Delegate_h
|
|
#define Delegate_h
|
|
|
|
@import Foundation;
|
|
|
|
@interface Request : NSObject
|
|
|
|
@end
|
|
|
|
@interface Delegate : NSObject
|
|
|
|
- (void)makeRequest1:(Request * _Nonnull)request completionHandler:(void (^ _Nullable)(void))handler;
|
|
|
|
- (void)makeRequest2:(NSObject * _Nonnull)request completionHandler:(void (^ _Nullable)(void))handler;
|
|
|
|
- (void)makeRequest3:(Request * _Nullable)request completionHandler:(void (^ _Nullable)(void))handler;
|
|
|
|
@end
|
|
|
|
@protocol MyAsyncProtocol
|
|
-(void)myAsyncMethod:(void (^ _Nullable)(NSError * _Nullable, NSString * _Nullable))completionHandler;
|
|
@end
|
|
|
|
@interface Delegate (SwiftImpls)
|
|
|
|
- (void)makeRequestFromSwift:(Request * _Nonnull)request completionHandler:(void (^ _Nullable)(void))handler;
|
|
|
|
@end
|
|
|
|
#endif
|