-
-
Save dabrahams/4c21b1ffba1aea2d7c3ca89d01517378 to your computer and use it in GitHub Desktop.
Compilation illegal instruction with swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) Target: arm64-apple-macosx12.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Pair<T0, T1> { | |
public var x0: T0 | |
public var x1: T1 | |
public init(x0: T0, x1: T1) { (self.x0, self.x1) = (x0, x1) } | |
} | |
extension Pair: RandomAccessCollection | |
where T0 == T1 | |
{ | |
public var startIndex: Int { 0 } | |
public var endIndex: Int { 2 } | |
public subscript(i: Int) -> T0 { | |
get { return i == 0 ? x0 : x1 } | |
set { if i == 0 { x0 = newValue } else { x1 = newValue } } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just
swift Zip2Collection.swift