Skip to content

Commit 1d2972b

Browse files
committed
chore: add test case for "SCIPIndexer.cc:122 enforced condition !baseLoc.empty()" segfault
Signed-off-by: Emi <emi@sourcegraph.com>
1 parent 91bcb11 commit 1d2972b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎test/scip/testdata/minitest_3.rb‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ def self.describe(name, &blk); end
1111
test_each([[1,2], [3,4]]) do |(a,b)|
1212

1313
describe "d" do
14+
# `before` inside `test_each` has a synthesized method name with an empty
15+
# source location. The indexer should skip that definition occurrence.
16+
before do
17+
end
1418
it "b" do
1519
T.reveal_type(a) # error: Revealed type: `Integer`
1620
end

‎test/scip/testdata/minitest_3.snapshot.rb‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def self.describe(name, &blk); end
3131
# ^ definition local 2$416088458
3232

3333
describe "d" do
34+
# `before` inside `test_each` has a synthesized method name with an empty
35+
# source location. The indexer should skip that definition occurrence.
36+
before do
37+
end
3438
# ⌄ enclosing_range_start [..] Test#`<it 'b'>`().
3539
it "b" do
3640
# ^^^ definition [..] Test#`<it 'b'>`().

0 commit comments

Comments
 (0)