From b4d81084098a9a88b384a6ecab88f175e0dda69d Mon Sep 17 00:00:00 2001 From: Cary R Date: Sun, 27 Dec 2020 12:05:00 -0800 Subject: [PATCH] Check if no argument task calls are allowed in the current context --- elaborate.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elaborate.cc b/elaborate.cc index da0bb7494..f75ebdedb 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -3581,6 +3581,9 @@ NetProc* PCallTask::elaborate_usr(Design*des, NetScope*scope) const /* Handle non-automatic tasks with no parameters specially. There is no need to make a sequential block to hold the generated code. */ if ((parm_count == 0) && !task->is_auto()) { + // Check if a task call is allowed in this context. + test_task_calls_ok_(des, scope); + NetUTask*cur = new NetUTask(task); cur->set_line(*this); return cur; @@ -3845,7 +3848,7 @@ NetProc* PCallTask::elaborate_method_(Design*des, NetScope*scope, * If during elaboration we determine (for sure) that we are calling a * task (and not just a void function) then this method tests if that * task call is allowed in the current context. If so, return true. If - * not, print and error message and return false; + * not, print an error message and return false; */ bool PCallTask::test_task_calls_ok_(Design*des, NetScope*scope) const {