mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
12 lines
380 B
Swift
12 lines
380 B
Swift
// RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=CC
|
|
|
|
// PR #39543: Make sure we can complete in this position without crashing.
|
|
extension String {
|
|
init(format: String, _: Any) { fatalError() }
|
|
}
|
|
extension RandomAccessCollection {
|
|
func foo() {
|
|
print(String(format: "", Int(distance(from:#^CC^# startIndex, to: startIndex))))
|
|
}
|
|
}
|