-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 6 Compiler Crash When Using Typed Throws in Function Declaration #78680
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Comments
nashysolutions
added
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
labels
Jan 16, 2025
Providing a stack dump to help as this may be related to another crash I've encountered with parameter packs and typed throws.
|
It is already fixed on the current trunk. (6b2fb2e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
The Swift 6 compiler crashes when compiling a function that uses typed throws with an error type. Removing the generic error type from the throws clause allows the code to compile successfully.
Reproduction
Error: Command SwiftCompile failed with nonzero exit code.
However, if I remove the generic error type from the throws clause, the code compiles successfully:
Expected behavior
Expected behavior
The compiler should not crash. Instead, it should either:
1. Successfully compile the function, or
2. Provide a clear and helpful error message if the syntax is incorrect.
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0
Xcode 16.2
Build version 16C5032a
ProductName: macOS
ProductVersion: 15.2
BuildVersion: 24C101
Additional information
No response
The text was updated successfully, but these errors were encountered: