diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 87854689..15283c77 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1461,7 +1461,7 @@ static LLConstant* expand_to_sarray(Type *base, Expression* exp) TypeSArray* tsa = static_cast(t); dims.push_back(tsa->dim->toInteger()); assert(t->nextOf()); - t = t->nextOf()->toBasetype(); + t = stripModifiers(t->nextOf()->toBasetype()); } size_t i = dims.size(); @@ -1482,8 +1482,8 @@ static LLConstant* expand_to_sarray(Type *base, Expression* exp) LLConstant* DtoConstExpInit(Loc loc, Type* type, Expression* exp) { #if DMDV2 - Type* expbase = exp->type->toBasetype()->mutableOf()->merge(); - Type* base = type->toBasetype()->mutableOf()->merge(); + Type* expbase = stripModifiers(exp->type->toBasetype())->merge(); + Type* base = stripModifiers(type->toBasetype())->merge(); #else Type* expbase = exp->type->toBasetype(); Type* base = type->toBasetype();