Skip to content

fix: Fix code navigation for enum values - #220

Merged
varungandhi-src merged 1 commit into
scip-ruby/masterfrom
vg/fix-enum-nav
Jul 16, 2024
Merged

varungandhi-src merged 1 commit into
scip-ruby/masterfrom
vg/fix-enum-nav

Conversation

@varungandhi-src

Copy link
Copy Markdown
Contributor

Motivation

With this patch, we reduce divergence from Sorbet by using a zero-length location
for the synthetic classes generated when rewriting enums. We also add a special-case
for emitting definitions for enum values, since I wasn't able to figure out a better
way to do the same thing.

Fixes #214

Test plan

Covered by snapshot tests.

Comment on lines -13 to +12
# ^ definition local 2~#119448696
# ^ definition [..] X#A#
# ^ reference [..] X#A#
# ^ reference [..] X#A.
# ^ definition [..] X#A.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The main change is that this correctly shows up as a definition rather than as a reference, and that spurious entities are no longer present here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant