Преглед изворни кода

consider TCast(e1,None) complex if e1 is complex

Simon Krajewski пре 12 година
родитељ
комит
7395967e8b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      codegen.ml

+ 2 - 2
codegen.ml

@@ -834,9 +834,9 @@ let promote_abstract_parameters ctx t = match t with
 *)
 *)
 let promote_complex_rhs ctx e =
 let promote_complex_rhs ctx e =
 	let rec is_complex e = match e.eexpr with
 	let rec is_complex e = match e.eexpr with
-		| TBlock _ | TSwitch _ | TIf _ | TTry _ -> true
+		| TBlock _ | TSwitch _ | TIf _ | TTry _ | TCast(_,Some _) -> true
 		| TBinop(_,e1,e2) -> is_complex e1 || is_complex e2
 		| TBinop(_,e1,e2) -> is_complex e1 || is_complex e2
-		| TParenthesis e | TMeta(_,e) -> is_complex e
+		| TParenthesis e | TMeta(_,e) | TCast(e, None) -> is_complex e
 		| _ -> false
 		| _ -> false
 	in
 	in
 	let rec loop f e = match e.eexpr with
 	let rec loop f e = match e.eexpr with