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.
This commit is contained in:
Martin Whitaker 2014-10-30 21:09:17 +00:00
parent 7fad4779c5
commit 7ab0824adf
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ void PFunction::elaborate_sig(Design*des, NetScope*scope) const
if (dynamic_cast<const struct void_type_t*> (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 {