[SR-9207] Crash casting NSError to URLError in Swift 4.x #51697
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
IRGen
LLVM IR generation
run-time crash
Bug → crash: Swift code crashed during execution
Attachment: Download
Environment
Xcode 10.x
Swift 4.x
macOS 10.14
Additional Detail from JIRA
md5: 285c46b30ea972e1d0abbc9cc57dc435
is duplicated by:
Issue Description:
I have a case where casting a Swift error to an NSError, and then attempting to cast to a URLError, results in a crash:
I'm not completely sure if this is a Swift compiler issue as I am unable to reproduce with a plain Swift file, but it is easily reproducible with a vanilla Xcode project (maybe there's a compiler flag I'm missing on the command line).
Checking the
domain
forNSURLErrorDomain
seems to be a workaround.The text was updated successfully, but these errors were encountered: