Dan Korostelev 8 years ago
parent
commit
7c7b35b27f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/optimization/optimizer.ml

+ 1 - 0
src/optimization/optimizer.ml

@@ -426,6 +426,7 @@ let rec type_inline ctx cf f ethis params tret config p ?(self_calling_closure=f
 				let rec loop e =
 					let r = match e.eexpr with
 					| TReturn _ -> true
+					| TFunction _ -> false
 					| TIf (_,_,None) | TSwitch (_,_,None) | TFor _ | TWhile (_,_,NormalWhile) -> false (* we might not enter this code at all *)
 					| TTry (a, catches) -> List.for_all has_term_return (a :: List.map snd catches)
 					| TIf (cond,a,Some b) -> has_term_return cond || (has_term_return a && has_term_return b)