diff options
| author | Alasdair Armstrong | 2018-12-12 18:02:16 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-12-12 18:02:16 +0000 |
| commit | 6a40f1a1fca791c141c9c4e71dbb1876812666a6 (patch) | |
| tree | 5aaa59a69aaa854f8888c08b6f7d42e876d3ecaa /src | |
| parent | 56fb5bf999d7cc900d6535da4168e220862d3d9c (diff) | |
Add a test for flow typing as found in the ARM 32-bit instructions
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
