Skip to content

Conversation

@ksss
Copy link
Contributor

@ksss ksss commented Mar 12, 2025

ref: ruby/rbs#2310

RBS::InstanceVariableDuplicationError and RBS::ClassInstanceVariableDuplicationError have been introduced in rbs, but since Steep does not recognize these errors, it results in an Unexpected error.

This PR fixes the issue so that Steep can properly display validation messages for these errors.

Message example

variable-duplication.rbs:3:2: [error] Duplicated instance variable name `@i` in `::Instance`
│ Diagnostic ID: RBS::InstanceVariableDuplicationError
│
└   @i: Integer
    ~~~~~~~~~~~

variable-duplication.rbs:8:2: [error] Duplicated class instance variable name `@ci` in `::ClassInstance`
│ Diagnostic ID: RBS::ClassInstanceVariableDuplicationError
│
└   self.@ci: Integer
    ~~~~~~~~~~~~~~~~~

Copy link
Owner

@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.

🙏

@soutaro soutaro added this to the Steep 1.10 milestone Mar 13, 2025
@soutaro soutaro merged commit 91909e0 into soutaro:master Mar 13, 2025
17 checks passed
@ksss ksss deleted the variable-duplication branch March 13, 2025 01:23
@soutaro soutaro added the Released The PR is already included in a published release label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Released The PR is already included in a published release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants