From 9f7087b1e0d7ac430e2c65317e8d3041992b66ff Mon Sep 17 00:00:00 2001 From: Jiezhong Yang Date: Sun, 5 May 2024 15:48:38 -0400 Subject: [PATCH] unknown scrutinee type handling done --- src/haz3lcore/statics/Statics.re | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/haz3lcore/statics/Statics.re b/src/haz3lcore/statics/Statics.re index f52617a7bc..857ba17b9b 100644 --- a/src/haz3lcore/statics/Statics.re +++ b/src/haz3lcore/statics/Statics.re @@ -440,24 +440,13 @@ and uexp_to_info_map = let e_tys = List.map(Info.exp_ty, es); let e_co_ctxs = List.map2(CoCtx.mk(ctx), p_ctxs, List.map(Info.exp_co_ctx, es)); - // | Unknown(_) => - // let (ps', _m) = - // map_m(go_pat(~is_synswitch=false, ~co_ctx=CoCtx.empty), ps, m); - // print_endline( - // Typ.join_all( - // ~empty=Unknown(Internal), - // ctx, - // List.map(Info.pat_ty, ps'), - // ) - // == None - // ? "some" : "none", - // ); - // | _ => () - // }; - // switch () let scrut_ty = switch (scrut.ty) { - | Unknown(_) => None + | Unknown(_) => + map_m(go_pat(~is_synswitch=false, ~co_ctx=CoCtx.empty), ps, m) + |> fst + |> List.map(Info.pat_ty) + |> Typ.join_all(~empty=Unknown(Internal), ctx) | ty => Some(ty) }; let (self, m) =