From 684ae81c8b462dd350bb9845637b00d4aa1a82f9 Mon Sep 17 00:00:00 2001 From: Kakadu Date: Tue, 13 Aug 2024 17:48:19 +0300 Subject: [PATCH] [ppx] Fix refier construction: better location error Signed-off-by: Dmitrii.Kosarev a.k.a. Kakadu --- ppx/reify/reify_impl.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppx/reify/reify_impl.ml b/ppx/reify/reify_impl.ml index aad843590..8b4773063 100644 --- a/ppx/reify/reify_impl.ml +++ b/ppx/reify/reify_impl.ml @@ -371,7 +371,7 @@ let reifier_of_core_type ?(reifier_for_var = Fun.id) ~loc kind = Exp.apply ~loc (pexp_ident ~loc (Located.mk ~loc (Lident reifier_name))) (Lazy.force args) | Lident "t" -> Exp.apply ~loc (pexp_ident ~loc (Located.mk ~loc (Lident reifier_name))) (Lazy.force args) - | _ -> assert false + | _ -> pexp_extension ~loc @@ Location.error_extensionf ~loc "Can't construct reifier " in let rec helper typ : expression = let loc = typ.ptyp_loc in