blob: 3300e535be1a491a8c212ead3881c53a08f6dc50 [file] [log] [blame]
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
public class NSNull : NSObject, NSCopying, NSSecureCoding {
public override func copy() -> AnyObject {
return copyWithZone(nil)
}
public func copyWithZone(_ zone: NSZone) -> AnyObject {
return self
}
public override init() {
// Nothing to do here
}
public required init?(coder aDecoder: NSCoder) {
// Nothing to do here
}
public func encodeWithCoder(_ aCoder: NSCoder) {
// Nothing to do here
}
public static func supportsSecureCoding() -> Bool {
return true
}
public override func isEqual(_ object: AnyObject?) -> Bool {
return object is NSNull
}
}
public func ===(lhs: NSNull?, rhs: NSNull?) -> Bool {
guard let _ = lhs, let _ = rhs else { return false }
return true
}