Typed throws that rely on a type's generic placeholder crash the compiler. #74289
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
typed throws
Feature → error handling → throws & rethrows: Typed throws
Description
I was trying to add strong error typing (the
(UnwrapError)
part) to this. It sadly didn't work.Reproduction
This all compiles fine.
But change the
<Voids>
to<T>
s, and the compiler crashes.Stack dump
Expected behavior
throws()
supports all errors that can be thrown.Environment
swift-driver version: 1.109.2 Apple Swift version 6.0 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
Target: arm64-apple-macosx14.0
Additional information
No response
The text was updated successfully, but these errors were encountered: