diff --git a/elab_sig.cc b/elab_sig.cc index 87c5c9b80..ed6e4274b 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -597,7 +597,7 @@ void PFunction::elaborate_sig(Design*des, NetScope*scope) const if (dynamic_cast (return_type_)) { ret_type = 0; } else { - ret_type = return_type_->elaborate_type(des, scope); + ret_type = return_type_->elaborate_type(des, scope->parent()); ivl_assert(*this, ret_type); } } else {