Explorar o código

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

Simon Krajewski %!s(int64=11) %!d(string=hai) anos
pai
achega
a10e653952
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

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