# HG changeset patch # User ChristianK # Date 1214140894 -7200 # Node ID ebfa488f4abcf662b3ed16e564d851824a9dc972 # Parent a92ec67eabe7c0c0cd032f64aac51b6273be553c [svn r314] Get correct value type for newing of multidimensional dynamic arrays. Fixes array_initialization_26_E. diff -r a92ec67eabe7 -r ebfa488f4abc gen/arrays.cpp --- a/gen/arrays.cpp Sun Jun 22 13:23:28 2008 +0200 +++ b/gen/arrays.cpp Sun Jun 22 15:21:34 2008 +0200 @@ -486,8 +486,13 @@ // 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