Using @rethrows
protocols in rethrows
functions allow the throws function to be called without try
#73503
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
No response
Reproduction
This code compiles correctly, but crushes at runtime
Expected behavior
The compiler should emit an error.
foo1
andfoo2
must be called withtry
.Environment
Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Additional information
Similar issues with throws closures:
try
in nested function #63191rethrows
checking can trivially be defeated using self executing closures #68131The text was updated successfully, but these errors were encountered: