mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
821 B
Plaintext
13 lines
821 B
Plaintext
// REQUIRES: objc_interop
|
|
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null
|
|
// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
|
|
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2
|
|
// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
|
|
|
|
func test1(_ a: [String], s: String) {
|
|
_ = a.firstIndex(of: s)
|
|
_ = a.firstIndex(where: { _ in true })
|
|
}
|
|
func test2(_ s: String, c: Character) {
|
|
_ = s.firstIndex(of: c)
|
|
} |