summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-11-20 19:44:11 +0000
committerAlasdair Armstrong2017-11-20 19:44:11 +0000
commitcdae9e0913020ba3cd7433c8de124df1f1ccdb04 (patch)
tree25e04f8236ddbe728fc107e6ab44949db59bb7f7 /src
parentc46ae4d67795682d79e737c671edec8ceee94287 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/type_check.ml2
1 files changed, 1 insertions, 1 deletions
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 =