소스 검색

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

Simon Krajewski 13 년 전
부모
커밋
a525411e87
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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 ->