[SR-10583] Segmentation fault: 11 starting from Swift 5 #52983
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
regression
swift 5.0
Attachment: Download
Environment
You can test this error building our project at its version 0.17.0 on Xcode 10.2, Swift 5.
We also isolated the problem in this playground, and check for its error log, that you can find in attachment.
Additional Detail from JIRA
md5: 396a3598532e8284f57a3fc07b8d6bab
duplicates:
Issue Description:
Starting from Swift 5, we start to hit a "Segmentation fault: 11" error on compile time. We encountered this error in our library FunctionalKit (it built perfectly for previous versions of Swift).
We found out that the problem is on the function `zip` that we defined for our `Result` type. In particular, error occur in compile-time if exists some code that use this `zip` function.
Starting from Swift 5, it seems to me that this error caused by the fact that the return type is:
`Result<Inclusive<F1,F2>,(A,B)> where Failure == Inclusive<F1,F2>, ParameterType == (A,B)`
and compiler is not able to understand that `Inclusive<F1,F2>` conforms to `Error` protocol, as requested by our `Result` type, even if we wrote
`extension Inclusive: Error where A: Error, B: Error {}`
The text was updated successfully, but these errors were encountered: