8000 Catch the message of VariableDuplicationError by ksss · Pull Request #1521 · soutaro/steep · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Catch the message of VariableDuplicationError #1521

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

Merged
merged 1 commit into from
Mar 13, 2025

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
0