diff --git a/stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift b/stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift index 7661ed6516a..f5daaa7304d 100644 --- a/stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift +++ b/stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift @@ -179,7 +179,7 @@ internal func readUInt() -> UInt { /// process. internal func sendReflectionInfos() { debugLog("BEGIN \(#function)"); defer { debugLog("END \(#function)") } - let infos = (0..<_dyld_image_count()).flatMap(getReflectionInfoForImage) + let infos = (0..<_dyld_image_count()).filterMap(getReflectionInfoForImage) var numInfos = infos.count debugLog("\(numInfos) reflection info bundles.") diff --git a/stdlib/public/SDK/Foundation/JSONEncoder.swift b/stdlib/public/SDK/Foundation/JSONEncoder.swift index 63ef116d05e..eb997eda62a 100644 --- a/stdlib/public/SDK/Foundation/JSONEncoder.swift +++ b/stdlib/public/SDK/Foundation/JSONEncoder.swift @@ -1212,7 +1212,7 @@ fileprivate struct _JSONKeyedDecodingContainer : KeyedDecodingCon // MARK: - KeyedDecodingContainerProtocol Methods public var allKeys: [Key] { - return self.container.keys.flatMap { Key(stringValue: $0) } + return self.container.keys.filterMap { Key(stringValue: $0) } } public func contains(_ key: Key) -> Bool { diff --git a/stdlib/public/SDK/Foundation/PlistEncoder.swift b/stdlib/public/SDK/Foundation/PlistEncoder.swift index 9544870d1f9..b8a852a7ccf 100644 --- a/stdlib/public/SDK/Foundation/PlistEncoder.swift +++ b/stdlib/public/SDK/Foundation/PlistEncoder.swift @@ -779,7 +779,7 @@ fileprivate struct _PlistKeyedDecodingContainer : KeyedDecodingCo // MARK: - KeyedDecodingContainerProtocol Methods public var allKeys: [Key] { - return self.container.keys.flatMap { Key(stringValue: $0) } + return self.container.keys.filterMap { Key(stringValue: $0) } } public func contains(_ key: Key) -> Bool {