-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using Spoom::Sorbet::Translate.rbs_comments_to_sorbet_sig, the line numbers aren't preserved. If the rewritten code is used in lieu of the original source, errors and stacktraces don't line up with the original source.
To Reproduce
print Spoom::Sorbet::Translate.rbs_comments_to_sorbet_sigs(<<~RB, file: "test.rb")
# typed: true
#: (
#| Integer
#| ) -> void
def foo(i); end
RB# typed: true
sig { params(i: Integer).void }
def foo(i); end
foo is defined at line 4 instead of line 6.
Expected behavior
Ideally
# typed: true
sig { params(
i: Integer
).void }
def foo(i); end
But this is fine too
# typed: true
sig { params(i: Integer).void }
def foo(i); end
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working