[SR-13402] Compiler crash in .map(\.localizedDescription)
with Error existentials
#55843
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
existentials
Feature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased values
expressions
Feature: expressions
IRGen
LLVM IR generation
key paths
Feature: key paths (both native and Objective-C)
swift 5.6
Environment
Apple Swift version 5.3 (swiftlang-1200.0.25.2 clang-1200.0.27.1)
Target: x86_64-apple-darwin19.6.0
Tested with Xcode 12.0 beta 4 and Xcode 11.6 on macOS 10.15.6. I have not tested it with recent master snapshot.
Additional Detail from JIRA
md5: 8583f4625786a8e3410481c25675562e
Issue Description:
This code crashes the compiler (Segmentation fault: 11):
It has something to do with the key path used as a function passed to map (and possibly also with the fact that the values are
Error
existentials). Using a normal closure expression instead of the key path does not crash:Stack trace:
The text was updated successfully, but these errors were encountered: