Skip to content

ppx: add test for #1085, add standalone ppx executable - #1091

Merged
raphael-proust merged 5 commits into
masterfrom
ppx-type-wrong-1085
Jan 23, 2026
Merged

raphael-proust merged 5 commits into
masterfrom
ppx-type-wrong-1085

Conversation

@raphael-proust

Copy link
Copy Markdown
Collaborator

Test for reported issue with type annotations. Test passes so issue is not reproduced.

The test also passes when cherry-picking the commit on top of 5.9.2

Comment thread src/ppx/ppx_lwt.ml Outdated
Comment on lines +80 to +101
(* TODO: I don't know how to trigger this
| Some constraint_ pv ->
begin match binding.pvb_pat.ppat_desc with
| Ppat_var pv ->
let e =
let open Ast_builder.Default in
pexp_let ~loc
Nonrecursive
[
Latest.value_binding ~constraint_
~loc
~pat:binding.pvb_pat
~expr:(pexp_ident ~loc {loc=pv.loc; txt=Lident pv.txt})
()
]
(aux (i+1) t)
in
[%expr (fun [%p binding.pvb_pat] -> [%e e])]
| _ ->
Location.Error.(raise (make ~loc "unsupported value binding constraint" ~sub:[]))
end
*)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I can't seem to make tests with this specific AST nodes. I also tried to make the polymorphic one.

I guess these are top-level stuff only? because use of let%lwt at top-level is discouraged i think it's ok for now.

@raphael-proust
raphael-proust merged commit 2e8e968 into master Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant