Browse Source

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

Simon Krajewski 10 years ago
parent
commit
3c38602723
1 changed files with 1 additions and 1 deletions
  1. 1 1
      analyzer.ml

+ 1 - 1
analyzer.ml

@@ -1055,7 +1055,7 @@ module ConstPropagation = struct
 			begin try
 				let v' = Ssa.get_origin_var v in
 				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
 				end
 			with Not_found ->