Remove the non-generic toString versions and create a single @readonly toString function that can be used by convertFromStringInterpolationSegment.

Swift SVN r21050
This commit is contained in:
Nadav Rotem
2014-08-05 22:59:13 +00:00
parent a66281474e
commit 744d1fb7b9
3 changed files with 15 additions and 18 deletions

View File

@@ -263,12 +263,12 @@ extension String : StringInterpolationConvertible {
}
public static func convertFromStringInterpolationSegment<T>(expr: T) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: Int) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: String) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: Float) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: Bool) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: UInt8) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: UInt32) -> String { return toString(expr) }
public static func convertFromStringInterpolationSegment(expr: Int) -> String { return toStringReadOnly(expr) }
public static func convertFromStringInterpolationSegment(expr: String) -> String { return toStringReadOnly(expr) }
public static func convertFromStringInterpolationSegment(expr: Float) -> String { return toStringReadOnly(expr) }
public static func convertFromStringInterpolationSegment(expr: Bool) -> String { return toStringReadOnly(expr) }
public static func convertFromStringInterpolationSegment(expr: UInt8) -> String { return toStringReadOnly(expr) }
public static func convertFromStringInterpolationSegment(expr: UInt32) -> String { return toStringReadOnly(expr) }
}
public func +(var lhs: String, rhs: String) -> String {