We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Block#location
1 parent 0e0bc0e commit d73d889Copy full SHA for d73d889
1 file changed
test/rbs/parser_test.rb
@@ -733,6 +733,20 @@ def test_parse_method_type2
733
end
734
735
736
+ def test_parse_method_type_block
737
+ RBS::Parser.parse_method_type(buffer("{ -> void } -> void")).tap do |method_type|
738
+ assert_equal "{ -> void }", method_type.block.location.source
739
+ end
740
+
741
+ RBS::Parser.parse_method_type(buffer("(Integer) { (Integer) -> void } -> void")).tap do |method_type|
742
+ assert_equal "{ (Integer) -> void }", method_type.block.location.source
743
744
745
+ RBS::Parser.parse_method_type(buffer("() ?{ () -> void } -> void")).tap do |method_type|
746
+ assert_equal "?{ () -> void }", method_type.block.location.source
747
748
749
750
def test_newline_inconsistency
751
code = "module Test\r\nend"
752
0 commit comments