ObjCBool is no longer implicitly converted to Bool on Linux

This commit is contained in:
Norio Nomura
2018-02-05 13:59:10 +09:00
parent 1705167860
commit e11690ecb4
3 changed files with 3 additions and 3 deletions
@@ -54,7 +54,7 @@ extension Configuration {
}
let isDirectory: Bool
#if os(Linux)
#if os(Linux) && (!swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3)))
isDirectory = isDirectoryObjC
#else
isDirectory = isDirectoryObjC.boolValue
@@ -86,7 +86,7 @@ extension String {
internal var isFile: Bool {
var isDirectoryObjC: ObjCBool = false
if FileManager.default.fileExists(atPath: self, isDirectory: &isDirectoryObjC) {
#if os(Linux)
#if os(Linux) && (!swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3)))
return !isDirectoryObjC
#else
return !isDirectoryObjC.boolValue
@@ -264,7 +264,7 @@ private extension String {
func isDirectory() -> Bool {
var isDir: ObjCBool = false
if FileManager.default.fileExists(atPath: self, isDirectory: &isDir) {
#if os(Linux)
#if os(Linux) && (!swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3)))
return isDir
#else
return isDir.boolValue