+ | A.ArrayExp {typ; size; init; pos} ->
+ check_int (trexp size) ~pos;
+ let ty = env_get_typ ~sym:typ ~env ~pos in
+ Type.if_array
+ ty
+ ~f:(fun ty_elements ->
+ check_same {exp=(); ty=ty_elements} (trexp init) ~pos
+ )
+ ~otherwise:(fun () ->
+ E.raise (E.Wrong_type_used_as_array {ty_id=typ; ty; pos})
+ );
+ return ty