Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ unreleased
+ test suite
- Add a test to ensure the behavior showed in issue #1517 is no longer relevant (#1995)
- Add a test to ensure the code fragment exhibited in issue #1118 no longer makes Merlin crash (#1996)
- Add a test case illustrating how a snippet produces two unrelated errors in issue #2000. (#2003)

merlin 5.6
==========
Expand Down
41 changes: 41 additions & 0 deletions tests/test-dirs/issue2000.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$ cat >main.ml <<EOF
> let a : type b. 'a as b list = []
> EOF

FIXME: This syntactically perfectly valid OCaml produce two unrelated cryptic error message.
Copy link
Collaborator

@voodoos voodoos Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FIXME: This syntactically perfectly valid OCaml produce two unrelated cryptic error message.
FIXME: This syntactically incorrect OCaml snippet produces two unrelated cryptic error message.

I beg to differ:

# let a : type b. 'a as b list = [];;
Error: Syntax error

See https://github.com/ocaml/merlin/issues/2000.
$ $MERLIN single errors -filename main.ml <main.ml
{
"class": "return",
"value": [
{
"start": {
"line": 1,
"col": 4
},
"end": {
"line": 1,
"col": 33
},
"type": "typer",
"sub": [],
"valid": true,
"message": "This definition has type bool which is less general than 'a. 'a"
},
{
"start": {
"line": 1,
"col": 21
},
"end": {
"line": 1,
"col": 23
},
"type": "parser",
"sub": [],
"valid": true,
"message": "In this scoped type, variable 'b is reserved for the local type b."
}
],
"notifications": []
}