Skip to content

Detect and add a fix-it for using : instead of -> in a function#3276

Draft
j-f1 wants to merge 4 commits into
mainfrom
jed/colon-to-arrow
Draft

Detect and add a fix-it for using : instead of -> in a function#3276
j-f1 wants to merge 4 commits into
mainfrom
jed/colon-to-arrow

Conversation

@j-f1

@j-f1 j-f1 commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

I accidentally do this quite regularly when changing a computed property to a method. This change adds a fix-it (including adding a space before the inserted ->) to make it a little easier to fix.

@j-f1

This comment was marked as outdated.

@j-f1 j-f1 force-pushed the jed/colon-to-arrow branch from d566fa0 to c1fcd35 Compare February 18, 2026 19:29

@rintaro rintaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is a very nice diagnostic that was missing in the new parser.

Comment thread Sources/SwiftParser/Declarations.swift Outdated
Comment thread Sources/SwiftParser/Declarations.swift Outdated
@j-f1

This comment was marked as outdated.

@j-f1 j-f1 force-pushed the jed/colon-to-arrow branch from d901c1e to 1de154f Compare February 24, 2026 19:16
@j-f1 j-f1 marked this pull request as draft February 25, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants