瀏覽代碼

fix changed detection in fuse

Simon Krajewski 9 年之前
父節點
當前提交
1482aca316
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      analyzer.ml

+ 2 - 2
analyzer.ml

@@ -368,9 +368,8 @@ module TexprFilter = struct
 					| TLocal v2 when v1 == v2 ->
 						if !found then raise Exit;
 						found := true;
-						changed := true;
 						e1
-					| TWhile _ ->
+					| TWhile _ | TFunction _ ->
 						e
 					| _ ->
 						Type.map_expr replace e
@@ -378,6 +377,7 @@ module TexprFilter = struct
 				begin try
 					let e = replace e2 in
 					if not !found then raise Exit;
+					changed := true;
 					fuse (e :: el)
 				with Exit ->
 					ev :: fuse (e2 :: el)