Skip to content

Commit

Permalink
Fix regression in construct test
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Dec 13, 2024
1 parent aa80995 commit 1ba5ae5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/ocaml/typing/typecore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5804,6 +5804,8 @@ and type_construct env ~sexp lid sarg ty_expected_explained =
| None -> Rejected
| Some _ ->
begin match sargs with
| [{pexp_desc = Pexp_extension ({ txt; _ }, _)}]
when txt = Ast_helper.hole_txt -> Required
| [{pexp_desc =
Pexp_ident _ |
Pexp_record (_, (Some {pexp_desc = Pexp_ident _}| None))}] ->
Expand Down
7 changes: 5 additions & 2 deletions tests/test-dirs/construct/c-inline-record-issue1617.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@

Construct also works with inline records
$ $MERLIN single construct -position 7:15 \
> -filename main.ml <main.ml | jq '.value[1]'
[]
> -filename main.ml <main.ml | jq '.value[1]'
[
"(Bar _)"
]

0 comments on commit 1ba5ae5

Please sign in to comment.