Bläddra i källkod

Revert "optimize exhaustive one-case matches (closes #2019)"

This reverts commit a18ce31a610d06cfa9a3a1282bbc1c13224a9ffa.
Simon Krajewski 12 år sedan
förälder
incheckning
b7775a713d
1 ändrade filer med 0 tillägg och 2 borttagningar
  1. 0 2
      codegen.ml

+ 0 - 2
codegen.ml

@@ -1638,8 +1638,6 @@ module PatternMatchConversion = struct
 		| DTGuard(e,dt1,dt2) ->
 			let ethen = convert_dt cctx dt1 in
 			mk (TIf(e,ethen,match dt2 with None -> None | Some dt -> Some (convert_dt cctx dt))) ethen.etype (punion e.epos ethen.epos)
-		| DTSwitch({eexpr = TMeta((Meta.Exhaustive,_,_),_)},[_,dt],None) ->
-			convert_dt cctx dt
 		| DTSwitch(e_st,cl,dto) ->
 			let def = match dto with None -> None | Some dt -> Some (convert_dt cctx dt) in
 			let cases = group_cases cl in