Fix conditional check for net class type

This commit is contained in:
Cary R. 2026-07-12 08:00:14 -07:00 committed by GitHub
parent e7233856c8
commit 2ff0be6bfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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<const netclass_t*>(sr.type);
if (!cls && net->net_type())
if (!cls && net->net_type()) {
cls = dynamic_cast<const netclass_t*>(net->net_type());
}
if (cls) {
perm_string prop_name = sr.path_tail.front().name;
int pidx = cls->property_idx_from_name(prop_name);