Skip to content

Commit d4daadf

Browse files
authored
Merge pull request #44 from tonyarnold/fix/swift-3.1
Only use duplicate typealias in Swift versions lower than 3.1
2 parents b4221fe + cb3e640 commit d4daadf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Diff.swift

+6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
public protocol DiffProtocol: Collection, Sequence {
33

44
associatedtype DiffElementType
5+
6+
#if swift(>=3.1)
7+
// The typealias is causing crashes in SourceKitService under Swift 3.1 snapshots.
8+
#else
9+
// TODO: Verify that the typealias workaround is still required when Xcode 8.3 is released.
510
typealias Index = Int
11+
#endif
612

713
var elements: [DiffElementType] { get }
814
}

0 commit comments

Comments
 (0)