Open
Description
Currently we set FunctionRefKind::Compound
for EnumElementPatterns to avoid needing to match labels in the solver. We instead ought to be setting the right kind and properly handling the label matching in the solver.
While here it also looks like the compound naming needs fixing too, e.g we currently allow this:
struct S: Equatable {
static func bar(x: Int) -> Self { fatalError() }
public static func == (_: Self, _: Self) -> Bool { false }
}
func foo(_ x: S) {
_ = {
switch x {
case .bar(x:)(x: 0):
break
default:
break
}
}
}
rdar://140415944