Encountered this compiler crash when a guard case is followed by a let (FB9643656). E.g.:
let value = CollectionDifference.Change.insert(offset: 1, element: 1, associatedWith: nil)
guard case .insert(_, _, let associatedWith) = value, let associatedWith = associatedWith else {
return
}
But splitting the two guarded conditions into separate guard statements solves the issue.
Topic:
Programming Languages
SubTopic:
Swift
Tags: