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

Add Numeric Node's check for parse rbs #1711

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

S-H-GAMELINKS
Copy link
Contributor

I'll introduce Numeric Node's for the parser in ruby/ruby#9417.

This changed the behavior of the rbs parse process and caused the test to fail.

This pull request has been modified to check Numeric Node's in parse process.

Copy link
Collaborator

@ksss ksss left a comment

Choose a reason for hiding this comment

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

Great works!

Comment on lines 701 to 702
when :RATIONAL, :IMAGINARY
BuiltinNames::Numeric.instance_type
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about to like this?

Suggested change
when :RATIONAL, :IMAGINARY
BuiltinNames::Numeric.instance_type
when :RATIONAL
Types::ClassInstance.new(name: TypeName("::Rational"), args: [], location: nil)
when :IMAGINARY
Types::ClassInstance.new(name: TypeName("::Complex"), args: [], location: nil)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review!
I've fixed it in the following commit.
225ed22

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

Thanks!

@soutaro soutaro added this to the RBS 3.5 milestone Jan 8, 2024
@soutaro soutaro added this pull request to the merge queue Jan 8, 2024
Merged via the queue into ruby:master with commit c7e53d2 Jan 8, 2024
23 checks passed
@S-H-GAMELINKS S-H-GAMELINKS deleted the introduce/numeric-nodes branch January 8, 2024 15:29
@soutaro soutaro added the Released PRs already included in the released version label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

3 participants