Browse Source

make sure fmt string is always restored (potential fix for #6820)

ncannasse 7 years ago
parent
commit
616f751368
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/typing/macroContext.ml

+ 1 - 1
src/typing/macroContext.ml

@@ -669,7 +669,7 @@ let type_macro ctx mode cpath f (el:Ast.expr list) p =
 			incr index;
 			incr index;
 			(EArray ((EArrayDecl [e],p),(EConst (Int (string_of_int (!index))),p)),p)
 			(EArray ((EArrayDecl [e],p),(EConst (Int (string_of_int (!index))),p)),p)
 		) el in
 		) el in
-		let elt, _ = unify_call_args mctx constants (List.map fst eargs) t_dynamic p false false in
+		let elt, _ = try unify_call_args mctx constants (List.map fst eargs) t_dynamic p false false with e -> List.iter (fun f -> f()) (!todo); raise e; in
 		List.iter (fun f -> f()) (!todo);
 		List.iter (fun f -> f()) (!todo);
 		List.map2 (fun (_,mct) e ->
 		List.map2 (fun (_,mct) e ->
 			let e, et = (match e.eexpr with
 			let e, et = (match e.eexpr with