mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The bug tracked by rdar://158172056 was already fixed by https://github.com/swiftlang/swift/pull/83607 but this additional test case is needed to ensure that conformances to Obj-C protocols with obsolete requirements imported under legacy spellings not regress again.
16 lines
390 B
Swift
16 lines
390 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
extension NSCouldConformToIndexable: @retroactive NSIndexable {
|
|
}
|
|
|
|
extension NSCouldConformToIndexable {
|
|
func testIndex(_ i: Int) {
|
|
_ = objectAtIndex(i) // expected-error {{'objectAtIndex' has been renamed to 'object(at:)'}}
|
|
_ = object(at: i)
|
|
}
|
|
}
|