Browse Source

remove void-rewrite in `promote_complex_rhs` because it is not implemented properly and causes too many issues (see #4004)

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

+ 3 - 3
filters.ml

@@ -59,11 +59,11 @@ let promote_complex_rhs com e =
 				| [] -> e
 				| [] -> e
 			end
 			end
 		| TSwitch(es,cases,edef) ->
 		| TSwitch(es,cases,edef) ->
-			{e with eexpr = TSwitch(es,List.map (fun (el,e) -> List.map find el,loop f e) cases,match edef with None -> None | Some e -> Some (loop f e)); etype = com.basic.tvoid}
+			{e with eexpr = TSwitch(es,List.map (fun (el,e) -> List.map find el,loop f e) cases,match edef with None -> None | Some e -> Some (loop f e)); }
 		| TIf(eif,ethen,eelse) ->
 		| TIf(eif,ethen,eelse) ->
-			{e with eexpr = TIf(find eif, loop f ethen, match eelse with None -> None | Some e -> Some (loop f e)); etype = com.basic.tvoid}
+			{e with eexpr = TIf(find eif, loop f ethen, match eelse with None -> None | Some e -> Some (loop f e)); }
 		| TTry(e1,el) ->
 		| TTry(e1,el) ->
-			{e with eexpr = TTry(loop f e1, List.map (fun (el,e) -> el,loop f e) el); etype = com.basic.tvoid}
+			{e with eexpr = TTry(loop f e1, List.map (fun (el,e) -> el,loop f e) el); }
 		| TParenthesis e1 when not (Common.defined com Define.As3) ->
 		| TParenthesis e1 when not (Common.defined com Define.As3) ->
 			{e with eexpr = TParenthesis(loop f e1)}
 			{e with eexpr = TParenthesis(loop f e1)}
 		| TMeta(m,e1) ->
 		| TMeta(m,e1) ->