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

Missing interpolation on abstract method error message #7270

Open
jez opened this issue Aug 30, 2023 · 1 comment
Open

Missing interpolation on abstract method error message #7270

jez opened this issue Aug 30, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jez
Copy link
Collaborator

jez commented Aug 30, 2023

Input

→ View on sorbet.run

# typed: true
class Module; include T::Sig; end

class Parent
  extend T::Helpers
  abstract!
  sig {abstract.returns(T::Boolean)}
  def want?; end
end

class Child < Parent
  
end

Observed output

editor.rb:11: Missing definition for abstract method `Parent#want?` https://srb.help/5023
    11 |class Child < Parent
        ^^^^^^^^^^^^^^^^^^^^
    editor.rb:8: want? defined here
     8 |  def want?; end
          ^^^^^^^^^
  Autocorrect: Use -a to autocorrect
    editor.rb:13: Insert sig { override.returns(T::Boolean) }
      def want?; end
    13 |end
        ^
Errors: 1
image

Expected behavior

Sorbet has special handling for the string

`{}`

inside a setHeader line. If it sees this sequence, it will only wrap the interpolated text in backticks if colorized errors have been disabled. If colorized errors are enabled, it will print in cyan.

Doing the interpolation manually gets in the way of this `{}` trick.


@jez jez added bug Something isn't working good first issue Good for newcomers labels Aug 30, 2023
@jsobralgitpush
Copy link

Can i work on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants