Sfoglia il codice sorgente

fix type equality check for ECheckType

Simon Krajewski 10 anni fa
parent
commit
ed3c3a4307
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -3573,7 +3573,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
 		let t = Typeload.load_complex_type ctx p t in
 		let e = type_expr ctx e (WithType t) in
 		let e = Codegen.AbstractCast.cast_or_unify ctx t e p in
-		if e.etype == t then e else mk (TCast (e,None)) t p
+		if type_iseq e.etype t then e else mk (TCast (e,None)) t p
 	| EMeta (m,e1) ->
 		let old = ctx.meta in
 		ctx.meta <- m :: ctx.meta;