     }
 }
 
-fileprivate struct FloatNaNPlaceholder : Codable, Equatable {
-    init() {}
-    
-    func encode(to encoder: Encoder) throws {
-        var container = encoder.singleValueContainer()
-        try container.encode(Float.nan)
-    }
-    
-    init(from decoder: Decoder) throws {
-        let container = try decoder.singleValueContainer()
-        let float = try container.decode(Float.self)
-        if !float.isNaN {
-            throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Couldn't decode NaN."))
-        }
-    }
-    
-    static func ==(_ lhs: FloatNaNPlaceholder, _ rhs: FloatNaNPlaceholder) -> Bool {
-        return true
-    }
-}
-
-fileprivate struct DoubleNaNPlaceholder : Codable, Equatable {
-    init() {}
-    
-    func encode(to encoder: Encoder) throws {
-        var container = encoder.singleValueContainer()
-        try container.encode(Double.nan)
-    }
-    
-    init(from decoder: Decoder) throws {
-        let container = try decoder.singleValueContainer()
-        let double = try container.decode(Double.self)
-        if !double.isNaN {
-            throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Couldn't decode NaN."))
-        }
-    }
-    
-    static func ==(_ lhs: DoubleNaNPlaceholder, _ rhs: DoubleNaNPlaceholder) -> Bool {
-        return true
-    }
-}
-
 fileprivate enum EitherDecodable<T : Decodable, U : Decodable> : Decodable {
     case t(T)
     case u(U)

    // MARK: - Encoder State
    // SR-6078
    func testEncoderStateThrowOnEncode() {
        struct ReferencingEncoderWrapper<T : Encodable> : Encodable {
            let value: T
            init(_ value: T) { self.value = value }

        do {
            let _ = try serialization.encode(NestedContainersTestType(testSuperEncoder: true))
        } catch let error as NSError {
            XCTFail("Caught error during encoding nested container types: \(error)")
        }
    }
    
    // MARK: - Type coercion
    func testTypeCoercion() {
        _testRoundTripTypeCoercionFailure(of: [false, true], as: [Int].self)
        // the following failures are actually other failures
        // because our current translator does not support UInt, Int8, etc.
        // This produces an error in unwrap of MetaDecoder.
        // but to test this mechanism is good too.
        _testRoundTripTypeCoercionFailure(of: [false, true], as: [Int8].self)
        _testRoundTripTypeCoercionFailure(of: [false, true], as: [Int16].self)
        _testRoundTripTypeCoercionFailure(of: [false, true], as: [Int32].self)
