File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -733,6 +733,20 @@ def test_parse_method_type2
733733 end
734734 end
735735
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+ end
744+
745+ RBS ::Parser . parse_method_type ( buffer ( "() ?{ () -> void } -> void" ) ) . tap do |method_type |
746+ assert_equal "?{ () -> void }" , method_type . block . location . source
747+ end
748+ end
749+
736750 def test_newline_inconsistency
737751 code = "module Test\r \n end"
738752
You can’t perform that action at this time.
0 commit comments