Browse Source

bugfix : coerce immediatly after array read

Nicolas Cannasse 18 năm trước cách đây
mục cha
commit
d59342ce00
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      genswf9.ml

+ 4 - 2
genswf9.ml

@@ -705,9 +705,11 @@ let rec gen_expr_content ctx retval e =
 		no_value ctx retval
 	| TField _
 	| TLocal _
-	| TTypeExpr _
-	| TArray _ ->
+	| TTypeExpr _ ->
 		getvar ctx (gen_access ctx e Read)
+	| TArray _ ->
+		getvar ctx (gen_access ctx e Read);
+		coerce ctx (classify ctx e.etype)
 	| TBinop (op,e1,e2) ->
 		gen_binop ctx retval op e1 e2
 	| TCall (e,el) ->