From 6a40f1a1fca791c141c9c4e71dbb1876812666a6 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Wed, 12 Dec 2018 18:02:16 +0000 Subject: Add a test for flow typing as found in the ARM 32-bit instructions --- src/type_check.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/type_check.ml b/src/type_check.ml index befc7302..47275594 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -2327,7 +2327,7 @@ let rec check_exp env (E_aux (exp_aux, (l, ())) as exp : unit exp) (Typ_aux (typ | Some (kopts, nc, Typ_aux (Typ_app (ab, [A_aux (A_bool flow, _)]), _)) when string_of_id ab = "atom_bool" -> let env = add_existential l kopts nc env in let then_branch' = crule check_exp (Env.add_constraint flow env) then_branch typ in - let else_branch' = crule check_exp (Env.add_constraint flow env) else_branch typ in + let else_branch' = crule check_exp (Env.add_constraint (nc_not flow) env) else_branch typ in annot_exp (E_if (cond', then_branch', else_branch')) typ | _ -> let then_branch' = crule check_exp (add_opt_constraint (assert_constraint env true cond') env) then_branch typ in -- cgit v1.2.3