소스 검색

add missing abstract cast check when typing iterators (closes #2345)

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

+ 1 - 1
typer.ml

@@ -2625,7 +2625,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
 				| _ ->
 					(try
 						unify_raise ctx e1.etype t e1.epos;
-						e1
+						Codegen.Abstract.check_cast ctx t e1 p
 					with Error (Unify _,_) ->
 						let acc = build_call ctx (type_field ctx e1 "iterator" e1.epos MCall) [] Value e1.epos in
 						try