From 7ab0824adfb382beaf63952cc355672ad8016389 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Thu, 30 Oct 2014 21:09:17 +0000 Subject: [PATCH] Fix for br961 - function return type elaborated in wrong scope. The return type of a function should be elaborated in the context of the enclosing scope, not in the context of the function itself. --- elab_sig.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {