Skip to content
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 symbol location for hash, keyword argument keys #397

Merged
merged 2 commits into from
Jan 7, 2025
Merged

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jan 7, 2025

Motivation

When the symbol is used as a: 1, the location should not include the colon.

Closes #388
Closes #378
Closes #377
Closes #374
Closes #371
Closes #367

I also found that after this PR, we can run and pass ALL non-error-related Sorbet tests 😄

Test plan

See included automated tests.

When the symbol is used as `a: 1`, the location should not include the colon.
@st0012 st0012 self-assigned this Jan 7, 2025
@st0012 st0012 requested review from amomchilov and egiurleo January 7, 2025 15:54
Copy link

@amomchilov amomchilov left a comment

Choose a reason for hiding this comment

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

Nice, nailing them out!

"testdata/namer/type_alias.rb",
"testdata/namer/type_member_inside_method.rb",
"testdata/namer/type_template_inside_method.rb",
"testdata/deviations/keyword_method_names.rb",

Choose a reason for hiding this comment

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

Is this a new regression?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really. We don't test against deviations tests atm and this one has syntax error so falls into the category that we don't plan to deal with now.

@st0012 st0012 merged commit 86c3ab6 into prism Jan 7, 2025
1 check passed
@st0012 st0012 deleted the fix-#367 branch January 7, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants