SR-4487 Crash when pattern matching two cases with associated values of protocol type
SR-4417 Compiler crashes when get value from enum specific case.
If a value type has a weak property, a switch statement that chains multiple case statements together, where those case statements each capture an instance of that type, will crash the Swift compiler with a segfault when attempting to emit SIL.
See the attached Playground and compare the two implementations of equality for TroubledEnum, but in short:
case .a(letx): returnxcase .b(letx): returnx
works fine but
case .a(letx), .b(letx): returnx
The text was updated successfully, but these errors were encountered: