[stdlib] Add missing unwraps for backward compatibility

Otherwise, the result would have been an infinite recursion.
This commit is contained in:
Dave Abrahams
2017-07-14 14:22:49 -07:00
parent e59cb97048
commit 38828872b9
3 changed files with 56 additions and 2 deletions

View File

@@ -504,7 +504,7 @@ extension String.UnicodeScalarView {
swift, obsoleted: 4.0,
message: "Any String view index conversion can fail in Swift 4; please unwrap the optional index")
public func index(after i: Index?) -> Index {
return index(after: i)
return index(after: i!)
}
@available(
swift, obsoleted: 4.0,