diff --git a/elab_expr.cc b/elab_expr.cc index 0902f5be1..ecdcda361 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -6654,19 +6654,8 @@ NetExpr* PENewArray::elaborate_expr(Design*des, NetScope*scope, NetExpr*size = size_->elaborate_expr(des, scope, use_wid, flags); NetExpr*init_val = 0; - if (dynamic_cast (init_)) { - // Special case: the initial value expression is an - // array_pattern. Elaborate the expression like the - // r-value to an assignment to array. + if (init_) { init_val = init_->elaborate_expr(des, scope, ntype, flags); - - } else if (init_) { - // Regular case: The initial value is an - // expression. Elaborate the expression as an element - // type. The run-time will assign this value to each element. - const netarray_t*array_type = dynamic_cast (ntype); - - init_val = init_->elaborate_expr(des, scope, array_type, flags); } NetENew*tmp = new NetENew(ntype, size, init_val);