diff --git a/gen/toir.cpp b/gen/toir.cpp index fc8d65a854..12372e2976 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -1578,15 +1578,9 @@ class ToElemVisitor : public Visitor { // get dim assert(e->arguments); assert(e->arguments->length >= 1); - if (e->arguments->length == 1) { - DValue *sz = toElem((*e->arguments)[0]); - // allocate & init - result = DtoNewDynArray(e->loc, e->newtype, sz, true); - } else { - assert(e->lowering); - LLValue *pair = DtoRVal(e->lowering); - result = new DSliceValue(e->type, pair); - } + assert(e->lowering); + LLValue *pair = DtoRVal(e->lowering); + result = new DSliceValue(e->type, pair); } // new static array else if (ntype->ty == TY::Tsarray) {