diff --git a/genneko.ml b/genneko.ml index 1c9683f7684..2f1c2613beb 100644 --- a/genneko.ml +++ b/genneko.ml @@ -421,7 +421,6 @@ and gen_expr ctx e = ],p) ) | TPatMatch dt -> - (* if e.epos.pfile = "Main.hx" then Array.iteri (fun i dt -> print_endline (string_of_int i); print_endline (s_dt "" dt)) dt.dt_dt_lookup; *) let num_labels = Array.length dt.dt_dt_lookup in let lc = ctx.label_count in ctx.label_count <- ctx.label_count + num_labels + 1; diff --git a/typer.ml b/typer.ml index 29904ce6f0e..767a45da8dc 100644 --- a/typer.ml +++ b/typer.ml @@ -2079,7 +2079,7 @@ and type_switch ctx e cases def (with_type:with_type) p = try if (Common.defined ctx.com Common.Define.NoPatternMatching) then raise Exit; let dt = match_expr ctx e cases def with_type p in - if not ctx.in_macro && ctx.com.config.pf_pattern_matching then mk (TPatMatch dt) dt.dt_type p else Codegen.PatternMatchConversion.to_typed_ast ctx dt p + if not ctx.in_macro && not (Common.defined ctx.com Define.Interp) && ctx.com.config.pf_pattern_matching then mk (TPatMatch dt) dt.dt_type p else Codegen.PatternMatchConversion.to_typed_ast ctx dt p with Exit -> type_switch_old ctx e cases def with_type p