From cd49c9df8e1d688327ae045729b538df00b77622 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 11 Nov 2019 17:00:24 +0000 Subject: Make sure undefined_gen inserts enough type annotations for union constructors --- src/initial_check.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/initial_check.ml') diff --git a/src/initial_check.ml b/src/initial_check.ml index 1aebdbc2..7012e915 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -931,8 +931,8 @@ let generate_undefineds vs_ids (Defs defs) = in let undefined_tu = function | Tu_aux (Tu_ty_id (Typ_aux (Typ_tup typs, _), id), _) -> - mk_exp (E_app (id, List.map (fun _ -> mk_lit_exp L_undef) typs)) - | Tu_aux (Tu_ty_id (typ, id), _) -> mk_exp (E_app (id, [mk_lit_exp L_undef])) + mk_exp (E_app (id, List.map (fun typ -> mk_exp (E_cast (typ, mk_lit_exp L_undef))) typs)) + | Tu_aux (Tu_ty_id (typ, id), _) -> mk_exp (E_app (id, [mk_exp (E_cast (typ, mk_lit_exp L_undef))])) in let p_tup = function | [pat] -> pat -- cgit v1.2.3