Fixed creating of arrays of immutable types

This commit is contained in:
Alexey Prokhin 2010-11-02 16:38:13 +03:00
parent 9103800334
commit 6b1243cec2

View file

@ -442,7 +442,7 @@ DSliceValue* DtoNewDynArray(Loc& loc, Type* arrayType, DValue* dim, bool default
LOG_SCOPE; LOG_SCOPE;
// typeinfo arg // typeinfo arg
LLValue* arrayTypeInfo = DtoTypeInfoOf(arrayType); LLValue* arrayTypeInfo = DtoTypeInfoOf(arrayType->mutableOf()->merge2());
// dim arg // dim arg
assert(DtoType(dim->getType()) == DtoSize_t()); assert(DtoType(dim->getType()) == DtoSize_t());
@ -493,7 +493,7 @@ DSliceValue* DtoNewMulDimDynArray(Loc& loc, Type* arrayType, DValue** dims, size
LOG_SCOPE; LOG_SCOPE;
// typeinfo arg // typeinfo arg
LLValue* arrayTypeInfo = DtoTypeInfoOf(arrayType); LLValue* arrayTypeInfo = DtoTypeInfoOf(arrayType->mutableOf()->merge2());
// get value type // get value type
Type* vtype = arrayType->toBasetype(); Type* vtype = arrayType->toBasetype();