diff --git a/gen/arrays.cpp b/gen/arrays.cpp index c7cb4363..e0a1970f 100644 --- a/gen/arrays.cpp +++ b/gen/arrays.cpp @@ -486,8 +486,13 @@ DSliceValue* DtoNewMulDimDynArray(Type* arrayType, DValue** dims, size_t ndims, // typeinfo arg LLValue* arrayTypeInfo = DtoTypeInfoOf(arrayType); + // get value type + Type* vtype = arrayType->toBasetype(); + for (size_t i=0; inextOf(); + // get runtime function - bool zeroInit = arrayType->toBasetype()->nextOf()->isZeroInit(); + bool zeroInit = vtype->isZeroInit(); LLFunction* fn = LLVM_D_GetRuntimeFunction(gIR->module, zeroInit ? "_d_newarraymT" : "_d_newarraymiT" ); // build dims