Skip to content

Commit b1b124c

Browse files
committed
Add reproduction case
1 parent d6fd03b commit b1b124c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tests/test-dirs/issue1980.t

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$ cat > test.ml <<EOF
2+
> module rec M : sig
3+
> val f : unit -> unit
4+
> end = struct
5+
> let f () = ()
6+
> end
7+
> and N : sig
8+
> val foo : unit -> unit
9+
> end = struct
10+
> let foo () = M.f ()
11+
> end
12+
> let foo () = M.f ()
13+
> EOF
14+
15+
$ ocamlmerlin single locate -position 11:16 -look-for implementation -filename test.ml < test.ml | jq .value
16+
{
17+
"file": "$TESTCASE_ROOT/test.ml",
18+
"pos": {
19+
"line": 4,
20+
"col": 6
21+
}
22+
}
23+
24+
-- FIXME : Merlin should return the definition position instead of the declaration one
25+
$ ocamlmerlin single locate -position 9:18 -look-for implementation -filename test.ml < test.ml | jq .value
26+
{
27+
"file": "$TESTCASE_ROOT/test.ml",
28+
"pos": {
29+
"line": 2,
30+
"col": 6
31+
}
32+
}

0 commit comments

Comments
 (0)