Skip to content

Commit

Permalink
ObjCBool is no longer implicitly converted to Bool on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Apr 8, 2018
1 parent d269948 commit 133cef8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Models/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 133cef8

Please sign in to comment.