Files
swift-mirror/test/Constraints/pr39543.swift
Hamish Knight ac50dfd1d4 [CS] Fix crasher caught by stress tester
We need to be more lenient checking here as the
type variable may not be bound yet.
2021-10-12 09:51:45 +01:00

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))))
}
}