Explorar el Código

allow typing of dynamic arrays when expected type is Dynamic (fixed issue #901)

Simon Krajewski hace 13 años
padre
commit
a525411e87
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      typer.ml

+ 3 - 0
typer.ml

@@ -1437,6 +1437,9 @@ and type_expr_with_type_raise ctx e t =
 						e
 					) el in
 					mk (TArrayDecl el) t p)
+			| TDynamic _ ->
+				let el = List.map (type_expr ctx) el in
+				mk (TArrayDecl el) (ctx.t.tarray t_dynamic) (snd e)				
 			| _ ->
 				type_expr ctx e)
 	| EObjectDecl el ->