From adb90b7335ad3d1d76eeb9f2aa3a91e05dd3140a Mon Sep 17 00:00:00 2001 From: Simon Krajewski Date: Wed, 11 Dec 2013 10:40:45 +0100 Subject: [PATCH] rev_map constructor inlining initializations so they have the correct order when reversed by the TBlock handler (closes #2455) --- optimizer.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimizer.ml b/optimizer.ml index d6599286c2b..98d123db4d8 100644 --- a/optimizer.ml +++ b/optimizer.ml @@ -1140,7 +1140,7 @@ let inline_constructors ctx e = {e with eexpr = TBlock (List.rev n)} | TVar (v,Some e) when v.v_id < 0 -> let (vars, _),el_init = PMap.find (-v.v_id) vfields in - el_b := (List.map subst el_init) @ !el_b; + el_b := (List.rev_map subst el_init) @ !el_b; let (v_first,e_first),vars = match vars with | v :: vl -> v,vl | [] -> assert false