File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments