-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upstream looping patch for short-path (#1645)
from voodoos/short-paths-loop
- Loading branch information
Showing
5 changed files
with
79 additions
and
13 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
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,56 @@ | ||
$ cat >test.ml <<'EOF' | ||
> module Id = struct | ||
> type 'a t = 'a | ||
> end | ||
> | ||
> module Unit = struct | ||
> type t = unit | ||
> end | ||
> | ||
> type 'a t = | ||
> | Id of 'a t Id.t | ||
> | Unit of Unit.t | ||
> EOF | ||
|
||
This query should not hang indefinitely | ||
$ $MERLIN single type-enclosing -position 11:17 -short-paths \ | ||
> -filename test.ml < test.ml | | ||
> jq '.value' | ||
[ | ||
{ | ||
"start": { | ||
"line": 11, | ||
"col": 12 | ||
}, | ||
"end": { | ||
"line": 11, | ||
"col": 18 | ||
}, | ||
"type": "type t = unit", | ||
"tail": "no" | ||
}, | ||
{ | ||
"start": { | ||
"line": 11, | ||
"col": 12 | ||
}, | ||
"end": { | ||
"line": 11, | ||
"col": 18 | ||
}, | ||
"type": "unit", | ||
"tail": "no" | ||
}, | ||
{ | ||
"start": { | ||
"line": 9, | ||
"col": 0 | ||
}, | ||
"end": { | ||
"line": 11, | ||
"col": 18 | ||
}, | ||
"type": "type 'a t = Id of 'a t | Unit of unit", | ||
"tail": "no" | ||
} | ||
] |