Skip to content

Commit 0780c58

Browse files
authored
Merge pull request #2003 from Tim-ats-d/repro-issue2000
Add a reproduction for issue #2000.
2 parents 1468603 + 0ac3ecf commit 0780c58

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ unreleased
99
+ test suite
1010
- Add a test to ensure the behavior showed in issue #1517 is no longer relevant (#1995)
1111
- Add a test to ensure the code fragment exhibited in issue #1118 no longer makes Merlin crash (#1996)
12+
- Add a test case illustrating how a snippet produces two unrelated errors in issue #2000. (#2003)
1213
- Add a test reproducing issue #1983 where `document` command which sometime concatenates consecutive variants and labels (#2005)
1314

1415
merlin 5.6

tests/test-dirs/issue2000.t

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
$ cat >main.ml <<EOF
2+
> let a : type b. 'a as b list = []
3+
> EOF
4+
5+
FIXME: This syntactically incorrect OCaml snippet produces two unrelated cryptic error message.
6+
See https://github.com/ocaml/merlin/issues/2000.
7+
$ $MERLIN single errors -filename main.ml <main.ml
8+
{
9+
"class": "return",
10+
"value": [
11+
{
12+
"start": {
13+
"line": 1,
14+
"col": 4
15+
},
16+
"end": {
17+
"line": 1,
18+
"col": 33
19+
},
20+
"type": "typer",
21+
"sub": [],
22+
"valid": true,
23+
"message": "This definition has type bool which is less general than 'a. 'a"
24+
},
25+
{
26+
"start": {
27+
"line": 1,
28+
"col": 21
29+
},
30+
"end": {
31+
"line": 1,
32+
"col": 23
33+
},
34+
"type": "parser",
35+
"sub": [],
36+
"valid": true,
37+
"message": "In this scoped type, variable 'b is reserved for the local type b."
38+
}
39+
],
40+
"notifications": []
41+
}

0 commit comments

Comments
 (0)