forked from ocaml/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix confusion when scraping aliases of module / module-types (ocaml#1676
- Loading branch information
Showing
3 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
$ cat >main.ml <<EOF | ||
> module B = struct | ||
> module type T = sig end | ||
> | ||
> module T = struct end | ||
> end | ||
> | ||
> module M : B.T = struct end | ||
> module type T2 = B.T | ||
> module M2 : T2 = struct end | ||
> EOF | ||
|
||
$ $MERLIN single locate -look-for mli -position 7:13 \ | ||
> -filename ./main.ml < ./main.ml | jq '.value.pos' | ||
{ | ||
"line": 2, | ||
"col": 2 | ||
} | ||
|
||
$ $MERLIN single locate -look-for ml -position 7:13 \ | ||
> -filename ./main.ml < ./main.ml | jq '.value.pos' | ||
{ | ||
"line": 2, | ||
"col": 2 | ||
} | ||
|
||
|
||
$ $MERLIN single locate -look-for mli -position 9:12 \ | ||
> -filename ./main.ml < ./main.ml | jq '.value.pos' | ||
{ | ||
"line": 2, | ||
"col": 2 | ||
} |