[stdlib] Improve the flatMap deprecation message

<rdar://problem/36555646>
This commit is contained in:
Max Moiseev
2018-01-19 15:29:41 -08:00
parent 36496ae9f7
commit aceb63e058
4 changed files with 13 additions and 9 deletions

View File

@@ -448,7 +448,8 @@ extension Collection {
return try _compactMap(transform)
}
@available(*, deprecated, renamed: "compactMap(_:)")
@available(*, deprecated, renamed: "compactMap(_:)",
message: "Please use compactMap(_:) for the case where closure returns an optional value")
@inline(__always)
public func flatMap(
_ transform: (Element) throws -> String?