Skip to content

Commit c7f15e8

Browse files
committed
Fix test in interface
1 parent 015c797 commit c7f15e8

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

test/rbs/signature_parsing_test.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2711,8 +2711,6 @@ class C
27112711
27122712
interface _C
27132713
include _M[void]
2714-
include _M[class]
2715-
include _M[instance]
27162714
end
27172715
SIG
27182716
end
@@ -2728,6 +2726,18 @@ class C
27282726
end
27292727
assert_equal [1, 18], ex.location.start_loc
27302728
assert_equal [1, 22], ex.location.end_loc
2729+
2730+
ex = assert_raises RBS::ParsingError do
2731+
Parser.parse_signature("interface _I include _M[class] end")
2732+
end
2733+
assert_equal [1, 24], ex.location.start_loc
2734+
assert_equal [1, 29], ex.location.end_loc
2735+
2736+
ex = assert_raises RBS::ParsingError do
2737+
Parser.parse_signature("interface _I include _M[instance] end")
2738+
end
2739+
assert_equal [1, 24], ex.location.start_loc
2740+
assert_equal [1, 32], ex.location.end_loc
27312741
end
27322742

27332743
def test_context_syntax_error_variable

0 commit comments

Comments
 (0)