소스 검색

replace locals in guards

Simon Krajewski 12 년 전
부모
커밋
fdd4226180
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      codegen.ml

+ 1 - 0
codegen.ml

@@ -1615,6 +1615,7 @@ module PatternMatchConversion = struct
 			to_typed_ast cctx (cctx.dt_lookup.(i))
 		| Expr e -> replace_locals cctx e
 		| Guard (e,dt1,dt2) ->
+			let e = replace_locals cctx e in
 			begin match dt2 with
 			| None -> mk (TIf(e,to_typed_ast cctx dt1,None)) t_dynamic e.epos
 			| Some dt ->