Swift cannot deduce thrown Error type when parameter closure throws the same error type as the calling function #80787
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
The snippet in
Reproduction
doesn't compile.Reproduction
Compiles:
Doesn't compile:
Expected behavior
Compiler should deduce that error thrown by the closure is the same kind of error and successfully compile the program.
Environment
swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: