You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Mar 30, 2017
· 2 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
SR-4487 Crash when pattern matching two cases with associated values of protocol type
relates to:
SR-4417 Compiler crashes when get value from enum specific case.
Issue Description:
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:
switchself {
case .a(letx): returnxcase .b(letx): returnx
}
works fine but
switchself {
case .a(letx), .b(letx): returnx
}
does not.
The text was updated successfully, but these errors were encountered:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Attachment: Download
Additional Detail from JIRA
md5: 42ecce32954c17632e7caea2dde28d5f
is duplicated by:
relates to:
Issue Description:
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:
works fine but
does not.
The text was updated successfully, but these errors were encountered: