Files
swift-mirror/test/Concurrency/Inputs/Delegate.h
Becca Royal-Gordon d3c70053b5 Warn about async-imported selector conflicts
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.
2022-06-28 02:05:02 -07:00

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