Przeglądaj źródła

bugfix inlined try/catch (fixed issue #668)

Nicolas Cannasse 13 lat temu
rodzic
commit
61ddcf1aba
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      optimizer.ml

+ 2 - 1
optimizer.ml

@@ -166,8 +166,9 @@ let rec type_inline ctx cf f ethis params tret p force =
 			{ e with eexpr = TMatch (map false v,en,cases,opt (map term) def); etype = !t }
 		| TTry (e1,catches) ->
 			{ e with eexpr = TTry (map term e1,List.map (fun (v,e) ->
+				let lv = (local v).i_subst in
 				let e = map term e in
-				(local v).i_subst,e
+				lv,e
 			) catches) }
 		| TBlock l ->
 			let old = save_locals ctx in