-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1865 from voodoos/fix-occurrences-no-sources
Fix occurrences when the definition's source is hidden
- Loading branch information
Showing
6 changed files
with
79 additions
and
18 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
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,47 @@ | ||
$ cat >noml.mli <<'EOF' | ||
> type t = unit | ||
> EOF | ||
|
||
$ cat >noml.ml <<'EOF' | ||
> type t = unit | ||
> EOF | ||
|
||
$ cat >main.ml <<'EOF' | ||
> let x : Noml.t = () | ||
> let y : Noml.t = () | ||
> EOF | ||
|
||
$ $OCAMLC -c -bin-annot noml.mli noml.ml main.ml | ||
|
||
We remove the source file to mimick cases were generated source files are not | ||
accessible to Merlin. | ||
$ rm noml.ml | ||
|
||
We still expect occurrences of definitions in hidden source files to work | ||
$ $MERLIN single occurrences -identifier-at 2:13 -filename main.ml <main.ml | ||
{ | ||
"class": "return", | ||
"value": [ | ||
{ | ||
"start": { | ||
"line": 1, | ||
"col": 13 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"col": 14 | ||
} | ||
}, | ||
{ | ||
"start": { | ||
"line": 2, | ||
"col": 13 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"col": 14 | ||
} | ||
} | ||
], | ||
"notifications": [] | ||
} |