Skip to content

Commit

Permalink
Add a test showing an issue with continuation patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Jan 7, 2025
1 parent 5701916 commit 5a87184
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions tests/test-dirs/type-enclosing/503-effects.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
$ cat >main.ml <<'EOF'
> open Effect
> open Effect.Deep
>
> type _ eff += E : unit eff
>
> let () =
> Printf.printf "%d\n%!" @@
> match 10 with
> | x -> x
> | effect E, k -> 11
> EOF

$ $MERLIN single errors -filename main.ml <main.ml
{
"class": "return",
"value": [],
"notifications": []
}

$ $MERLIN single type-enclosing -position 10:13 \
> -filename main.ml <main.ml | jq '.value[0]'
{
"start": {
"line": 10,
"col": 13
},
"end": {
"line": 10,
"col": 14
},
"type": "unit eff",
"tail": "no"
}

FIXME: the continuation is invisible to Merlin
$ $MERLIN single type-enclosing -position 10:16 \
> -filename main.ml <main.ml | jq '.value[0]'
{
"start": {
"line": 8,
"col": 4
},
"end": {
"line": 10,
"col": 23
},
"type": "int",
"tail": "no"
}

0 comments on commit 5a87184

Please sign in to comment.