mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When printing an ObjC member into a header with an `Int` parameter or result, PrintAsClang would look up any imported Objective-C member it overrode to see if ClangImporter imported `NSUInteger` as `Int`, and if so, would print `NSUInteger` instead of `NSInteger`. However, it did not do the same for protocol requirements the member witnessed. Correct this oversight. Fixes rdar://124300674.
27 lines
645 B
Objective-C
27 lines
645 B
Objective-C
@import Foundation;
|
|
|
|
@interface Base : NSObject
|
|
- (NSUInteger)foo;
|
|
- (NSUInteger)foo:(NSUInteger)ignored;
|
|
- (NSUInteger)foo:(NSUInteger)x y:(NSUInteger)y;
|
|
|
|
@property(readonly,getter=getProp) NSUInteger prop;
|
|
@property(readonly) NSInteger originalName __attribute__((swift_name("renamedProp")));
|
|
|
|
- (id)objectAtIndexedSubscript:(NSUInteger)idx;
|
|
|
|
- (void)callback:(NSUInteger(^)(void))block;
|
|
|
|
- (BOOL)doThingAndReturnError:(NSError **)error;
|
|
- (BOOL)doAnotherThingWithError:(NSError **)error;
|
|
|
|
@end
|
|
|
|
@protocol Proto <NSObject>
|
|
|
|
- (NSUInteger)proto;
|
|
- (NSUInteger)proto:(NSUInteger)ignored;
|
|
- (NSUInteger)proto:(NSUInteger)x y:(NSUInteger)y;
|
|
|
|
@end
|