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
Fix-its for misplaced typed throws could be improved #2391
Comments
Tracked in Apple’s issue tracker as rdar://119341656 |
@ahoppen hey can I work on this? |
@vj-codes yes, please! |
I looked into this briefly and it looks like when the following syntax is parsed and the first throws clause has no type - wonder if that's the reason why the type is later omitted and is thought to be part of the return clause? Also wondering what the difference is between
|
Yes, if I remember correctly parsing the type in a misspelled Parsed tokens are a version of materialized tokens that are optimized for parsing speed. The main difference is that a |
Issue Kind
Bad Diagnostic Produced
Source Code
Description
Applying the Fix-It for the parser diagnostics here produces malformed code, because the thrown error type gets lost. The "fixed" code is:
It should be
The text was updated successfully, but these errors were encountered: