Building a project in Xcode 11.4 beta 3, I'm getting this Swift Compiler error on an enum:
The enum case has a single tuple as an associated value, but there are several patterns here, implicitly tupling the patterns and trying to match that instead
Source code:
switch result {
case .error(let err):
//
case .value(let staff, let locations): // <-- error on this line
//
}
Result is an generic enum with associated values for .error and .value. In this case, the associated value is a tupple.
public enum Result<T> {
case value(T)
case error(Error)
}
Don't recall seeing this error before, and searching for it did not yield any results. Any ideas?