You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s(:begin,
s(:class,
s(:const, nil, :Parent), nil, nil),
s(:class,
s(:const, nil, :Child),
s(:const, nil, :Pare), nil))
editor.rb:4: unexpected token "end of file" https://srb.help/2001
4 | # ^ completion: Parent
5 |
editor.rb:3: Hint: this "class" token is not closed before the end of the file https://srb.help/2003
3 |class Child < Pare
^^^^^
editor.rb:3: Unable to resolve constant Pare https://srb.help/5002
3 |class Child < Pare
^^^^
Did you mean Rake? Use -a to autocorrect
editor.rb:3: Replace with Rake
3 |class Child < Pare
^^^^
https://github.com/sorbet/sorbet/tree/master/rbi/gems/rake.rbi#L6: Rake defined here
6 |module Rake
^^^^^^^^^^^
Did you mean Date? Use -a to autocorrect
editor.rb:3: Replace with Date
3 |class Child < Pare
^^^^
https://github.com/sorbet/sorbet/tree/master/rbi/stdlib/date.rbi#L159: Date defined here
159 |class Date
^^^^^^^^^^
Did you mean Parent? Use -a to autocorrect
editor.rb:3: Replace with Parent
3 |class Child < Pare
^^^^
editor.rb:2: Parent defined here
2 |class Parent; end
^^^^^^^^^^^^
editor.rb:3: Unable to resolve constant Pare https://srb.help/5002
3 |class Child < Pare
^^^^
Did you mean Rake? Use -a to autocorrect
editor.rb:3: Replace with Rake
3 |class Child < Pare
^^^^
https://github.com/sorbet/sorbet/tree/master/rbi/gems/rake.rbi#L6: Rake defined here
6 |module Rake
^^^^^^^^^^^
Did you mean Date? Use -a to autocorrect
editor.rb:3: Replace with Date
3 |class Child < Pare
^^^^
https://github.com/sorbet/sorbet/tree/master/rbi/stdlib/date.rbi#L159: Date defined here
159 |class Date
^^^^^^^^^^
Did you mean Parent? Use -a to autocorrect
editor.rb:3: Replace with Parent
3 |class Child < Pare
^^^^
editor.rb:2: Parent defined here
2 |class Parent; end
^^^^^^^^^^^^
Errors: 4
Expected behavior
It would be nice to show completion results for constant literals in superclass positions.
It's quite possible that this would not be immediately useful, because every keystroke would trigger a slow path edit, which would be prohibitively expensive on large codebases, but it would be passable on small codebases and would be a step in the right direction for large codebases.
Note that we already recover from the typical parse error that users would see here, so there's likely no parser changes holding us back from making practical improvements here.
The text was updated successfully, but these errors were encountered:
jez
added
enhancement
New feature or surprising current feature
IDE
Relating to Sorbet's LSP server or VS Code extension
labels
Apr 17, 2024
Input
→ View on sorbet.run
Observed output
Expected behavior
It would be nice to show completion results for constant literals in superclass positions.
It's quite possible that this would not be immediately useful, because every keystroke would trigger a slow path edit, which would be prohibitively expensive on large codebases, but it would be passable on small codebases and would be a step in the right direction for large codebases.
Note that we already recover from the typical parse error that users would see here, so there's likely no parser changes holding us back from making practical improvements here.
The text was updated successfully, but these errors were encountered: