Changed to if swift package generate-xcodeproj(>=4.1)

This commit is contained in:
andy
2018-10-01 15:11:03 +01:00
parent fd79045053
commit 4154cd31ff

View File

@@ -1,7 +1,6 @@
import Foundation import Foundation
#if swift(>=4.1) #if !swift(>=4.1)
#else
public extension Sequence { public extension Sequence {
func compactMap<ElementOfResult>(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] { func compactMap<ElementOfResult>(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] {
return try flatMap(transform) return try flatMap(transform)
@@ -9,8 +8,7 @@ import Foundation
} }
#endif #endif
#if swift(>=4.1) #if !swift(>=4.1)
#else
public extension Collection { public extension Collection {
func index(_ i: Self.Index, offsetBy n: Int) -> Self.Index { func index(_ i: Self.Index, offsetBy n: Int) -> Self.Index {
let indexDistance = Self.IndexDistance(n) let indexDistance = Self.IndexDistance(n)
@@ -19,8 +17,7 @@ import Foundation
} }
#endif #endif
#if swift(>=4.1) #if !swift(>=4.1)
#else
public extension TemplateSyntaxError { public extension TemplateSyntaxError {
public static func ==(lhs: TemplateSyntaxError, rhs: TemplateSyntaxError) -> Bool { public static func ==(lhs: TemplateSyntaxError, rhs: TemplateSyntaxError) -> Bool {
return lhs.reason == rhs.reason && return lhs.reason == rhs.reason &&
@@ -32,8 +29,7 @@ public extension TemplateSyntaxError {
} }
#endif #endif
#if swift(>=4.1) #if !swift(>=4.1)
#else
public extension Variable { public extension Variable {
public static func ==(lhs: Variable, rhs: Variable) -> Bool { public static func ==(lhs: Variable, rhs: Variable) -> Bool {
return lhs.variable == rhs.variable return lhs.variable == rhs.variable