-
Notifications
You must be signed in to change notification settings - Fork 441
Improve diagnostics for misspelt 'assocatedtype' #2180
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
Labels
SwiftParser
Bugs in the (new) Parser written in Swift
Comments
@ahoppen Should we start transferring parser recovery issues like these to swift-syntax? |
Yes, we should track them in the swift-syntax repo + attach the SwiftParser keyword. |
Tracked in Apple’s issue tracker as rdar://115385848 |
AppAppWorks
added a commit
to AppAppWorks/swift-syntax
that referenced
this issue
Aug 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Almost everything in Swift uses camelCase. A notable exception is
associatedtype
. If a user happens to writeassociatedType
in a protocol declaration we currently provide rather poor diagnostics, assuming they meant to declare a function requirement. We should improve those diagnostics, pointing them to the recognised spelling.Steps to reproduce
Note that the suggested "fixed" expression does not correct the capitalisation.
Expected behavior
Expect we would notice that a user writing
associatedType
is clearly trying to writeassociatedtype
, and direct them to the correct spelling.Environment
The text was updated successfully, but these errors were encountered: