[Amend] Fixed swift 3.0 compile error for type(of:)

This commit is contained in:
Amir Abbas
2017-07-01 11:08:49 +04:30
parent 3d9625e243
commit fd293f7bdb
+7
View File
@@ -143,9 +143,16 @@ open class FileObject: Equatable {
if rhs === lhs {
return true
}
#if swift(>=3.1)
if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
#else
if type(of: lhs) != type(of: rhs) {
return false
}
#endif
if let rurl = rhs.allValues[.fileURLKey] as? URL, let lurl = lhs.allValues[.fileURLKey] as? URL {
return rurl == lurl
}