From eaa3a10e8c20a910a9f34ce7532e72b460e5f6e5 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 29 Dec 2020 10:29:15 -0800 Subject: [PATCH] Elaborate parameter types in the scope of the paramter. --- net_design.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net_design.cc b/net_design.cc index cd0efabdb..f6a7c15e9 100644 --- a/net_design.cc +++ b/net_design.cc @@ -828,9 +828,10 @@ void NetScope::evaluate_parameter_(Design*des, param_ref_t cur) { ivl_type_t param_type = cur->second.ivl_type; - // If the parameter type is present, then elaborate it now. + // If the parameter type is present, then elaborate it now. Elaborate + // the type in the current scope, and not the scope of the expression. if (cur->second.val_type) { - param_type = cur->second.val_type->elaborate_type(des, cur->second.val_scope); + param_type = cur->second.val_type->elaborate_type(des, this); cur->second.ivl_type = param_type; cur->second.val_type = 0; }