There was an error while loading. Please reload this page.
1 parent d6fd03b commit 9e4e174Copy full SHA for 9e4e174
1 file changed
tests/test-dirs/issue1980.t
@@ -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
10
+ > let foo () = M.f ()
11
12
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
+-- 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
28
29
+ "line": 2,
30
31
32
0 commit comments