Browse Source

cancel inlining on TPatMatch for now

Simon Krajewski 12 years ago
parent
commit
f3ab2ebfab
1 changed files with 3 additions and 0 deletions
  1. 3 0
      optimizer.ml

+ 3 - 0
optimizer.ml

@@ -249,6 +249,9 @@ let rec type_inline ctx cf f ethis params tret config p force =
 			) cases in
 			let def = opt (map term) def in
 			{ e with eexpr = TMatch (map false v,en,cases,def); etype = if term && ret_val then unify_min ctx ((List.map (fun (_,_,e) -> e) cases) @ (match def with None -> [] | Some e -> [e])) else e.etype }
+		| TPatMatch _ ->
+			cancel_inlining := true; (* TODO *)
+			e
 		| TSwitch (e1,cases,def) when term ->
 			let term = term && def <> None in
 			let cases = List.map (fun (el,e) ->