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

Encode current behavior of helpers parsing #347

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Aug 6, 2024

Currently, the only Sorbet helpers we parse as Helper instance are abstract!, interface! and sealed!. Other helpers are parsed as Send instance:

tree = parse_rbi(<<~RBI)
  abstract!
  foo!
RBI

puts tree.nodes # => [<Helper @name="abstract">, <Send @name="foo!">]

Though you can create different Helper instances using the API:

Helper.new("foo!")

I'm not sure this is the right behavior but let's at least encode that this is expected in the tests.

@Morriar Morriar added the chore Chore task label Aug 6, 2024
@Morriar Morriar self-assigned this Aug 6, 2024
@Morriar Morriar requested a review from a team as a code owner August 6, 2024 14:53
@Morriar Morriar requested review from amomchilov and KaanOzkan August 6, 2024 14:53
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar force-pushed the at-fix-parse-helpers branch from 37bc668 to d5179d5 Compare August 6, 2024 15:35
@Morriar Morriar merged commit a860063 into main Aug 6, 2024
8 checks passed
@Morriar Morriar deleted the at-fix-parse-helpers branch August 6, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants