From cdae9e0913020ba3cd7433c8de124df1f1ccdb04 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 20 Nov 2017 19:44:11 +0000 Subject: Fix a bug with constraint generation in flow typing. This bug manifested as the ARM example elf executable printing the wrong characters... but otherwise doing not failing and exiting cleanly. It didn't trigger the test suite at all. I tracked it down to this line using git-bisect, and while returning nc_true is a bit suspect I'm still not 100% sure how this caused such a subtle and annoying bug in the generated ocaml code - it took several hours to track down the breakage to this line. --- 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 0c4c9f8e..64b161f7 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -1834,7 +1834,7 @@ let rec assert_constraint env (E_aux (exp_aux, _) as exp) = | _ -> begin typ_debug ("Unable to construct a constraint for expression " ^ string_of_exp exp); - nc_true + raise Not_a_constraint end type flow_constraint = -- cgit v1.2.3