瀏覽代碼

[analyzer] do not replace locals if the type changes (closes #3964)

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

+ 1 - 1
analyzer.ml

@@ -1055,7 +1055,7 @@ module ConstPropagation = struct
 			begin try
 			begin try
 				let v' = Ssa.get_origin_var v in
 				let v' = Ssa.get_origin_var v in
 				begin match v'.v_extra with
 				begin match v'.v_extra with
-					| Some ([],_) -> get_block_depth v <= get_block_depth v0
+					| Some ([],_) -> get_block_depth v <= get_block_depth v0 && type_iseq v0.v_type v.v_type
 					| _ -> false
 					| _ -> false
 				end
 				end
 			with Not_found ->
 			with Not_found ->