Compilation fails when passing error-specified throwable closure that throws expected type error #74460
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
typed throws
Feature → error handling → throws & rethrows: Typed throws
Description
Compilation failed when you throw an error in a type-specific error throwing closure (and throwing error is the same type as expected)
Reproduction
Expected behavior
Compilation succeeded
Environment
swift-driver version: 1.109.2 Apple Swift version 6.0 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
Additional information
This sample is just the shortest way to reproduce the error.
There can be workarounds, but they are hard to use in a more complex production code.
The text was updated successfully, but these errors were encountered: