We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cb65ab commit d1a833aCopy full SHA for d1a833a
1 file changed
test/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs_test.rb
@@ -560,6 +560,32 @@ def ensure_string(text)
560
RB
561
end
562
563
+ def test_translate_broken_type_alias_continuation
564
+ contents = <<~RB
565
+ #: type multiLine =
566
+ #| String
567
+ #| | Integer
568
+ # foo bar baz
569
+ #| | Symbol
570
+
571
+ #: () -> multiLine
572
+ def foo
573
+ ""
574
+ end
575
+ RB
576
577
+ assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
578
+ MultiLine = T.type_alias { T.any(String, Integer) }
579
580
581
582
+ sig { returns(MultiLine) }
583
584
585
586
587
588
589
private
590
591
#: (String, ?max_line_length: Integer?) -> String
0 commit comments