Bläddra i källkod

don't pop locals when closing block if not pf_unique_locals (close #2545)

Nicolas Cannasse 11 år sedan
förälder
incheckning
19be4687e0
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      filters.ml

+ 1 - 1
filters.ml

@@ -672,7 +672,7 @@ let rename_local_vars com e =
 	in
 	let save() =
 		let old = !vars in
-		if cfg.pf_unique_locals then (fun() -> ()) else (fun() -> vars := if !rebuild_vars then rebuild old else old)
+		if cfg.pf_unique_locals || not cfg.pf_locals_scope then (fun() -> ()) else (fun() -> vars := if !rebuild_vars then rebuild old else old)
 	in
 	let rename vars v =
 		let count = ref 1 in