mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Make String("...") non-failable in Swift 4
This commit is contained in:
@@ -46,6 +46,7 @@ extension String : StringProtocol {
|
||||
}
|
||||
|
||||
// This initializer satisfies the LosslessStringConvertible conformance
|
||||
@available(swift, obsoleted: 4, message: "String.init(_:String) is no longer failable")
|
||||
public init?(_ other: String) {
|
||||
self.init(other._core)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user