File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Inputs/clang-importer-sdk/usr/include Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1243,3 +1243,11 @@ void takeNullableId(_Nullable id);
12431243@interface PaletteDescriptor : NSObject <NSCopying >
12441244@property (readonly , nonnull ) ColorArray *colors;
12451245@end
1246+
1247+ @protocol NSIndexable <NSObject >
1248+ - (id )objectAtIndex : (NSInteger )index ;
1249+ @end
1250+
1251+ @interface NSCouldConformToIndexable : NSObject
1252+ - (id )objectAtIndex : (NSInteger )index ;
1253+ @end
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s
2+
3+ // REQUIRES: objc_interop
4+
5+ import Foundation
6+
7+ extension NSCouldConformToIndexable : @retroactive NSIndexable {
8+ }
9+
10+ extension NSCouldConformToIndexable {
11+ func testIndex( _ i: Int ) {
12+ _ = objectAtIndex ( i) // expected-error {{'objectAtIndex' has been renamed to 'object(at:)'}}
13+ _ = object ( at: i)
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments