diff --git a/elaborate.cc b/elaborate.cc index 4d48fa546..e2e409f7f 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -4337,8 +4337,9 @@ NetProc* PCallTask::elaborate_method_(Design*des, NetScope*scope, // e.g. c.q.push_back(x) => sr.path_tail = {q}, method_name = push_back if (sr.path_tail.size() == 1) { const netclass_t*cls = dynamic_cast(sr.type); - if (!cls && net->net_type()) + if (!cls && net->net_type()) { cls = dynamic_cast(net->net_type()); + } if (cls) { perm_string prop_name = sr.path_tail.front().name; int pidx = cls->property_idx_from_name(prop_name);