Skip to content

Comments

Support RBS::AST::Members::InstanceVariable#322

Merged
mame merged 2 commits intoruby:masterfrom
S-H-GAMELINKS:support/rbs-ast-members-instance-variable
Jun 20, 2025
Merged

Support RBS::AST::Members::InstanceVariable#322
mame merged 2 commits intoruby:masterfrom
S-H-GAMELINKS:support/rbs-ast-members-instance-variable

Conversation

@S-H-GAMELINKS
Copy link
Contributor

When I was implementing TypeProf LSP plugin for coc.nvim, and I found the following this error.

'TypeProf::Core::AST.create_rbs_member': unsupported: RBS::AST::Members::InstanceVariable (RuntimeError)

Reading the code based on the error message, I found that an error occurs when instance variable written in RBS.

Therefore, I have added the SigInstanceVariableNode class that can be used in the case of RBS::AST::Members::InstanceVariable in TypeProf::Core::AST.create_rbs_member method.

However, I am not familiar with the internal code of TypeProf, so I would appreciate any comments if you have any better ways of writing it.

Copy link
Contributor

@sinsoku sinsoku left a comment

Choose a reason for hiding this comment

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

How about adding a scenario for instance variable type declarations?
Tests for RBS are in scenario/rbs directory.

Co-Authored-By: Takumi Shotoku <sinsoku.listy@gmail.com>
@mame
Copy link
Member

mame commented Jun 20, 2025

@S-H-GAMELINKS Thank you very much for the contribution and very sorry for my very late response! I will merge it soon

@mame mame merged commit dda1141 into ruby:master Jun 20, 2025
7 checks passed
@S-H-GAMELINKS
Copy link
Contributor Author

@mame
I'm sorry I didn't get back to you too
Thanks again merge!

@S-H-GAMELINKS S-H-GAMELINKS deleted the support/rbs-ast-members-instance-variable branch June 21, 2025 14:49
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.

3 participants