Report error on function call output tied to constant.

Fix internal error on functions called as SV tasks.
This commit is contained in:
Wilson Snyder
2011-02-14 19:25:30 -05:00
parent e26a75c59d
commit e5de759236
8 changed files with 129 additions and 45 deletions
+1
View File
@@ -500,6 +500,7 @@ private:
if (!taskp) { nodep->v3error("Can't find definition of task/function: "<<nodep->prettyName()); }
nodep->taskp(taskp);
nodep->packagep(packageFor(taskp));
if (taskp->castTask() && nodep->castFuncRef()) nodep->v3error("Illegal call of a task as a function: "<<nodep->prettyName());
}
}
nodep->iterateChildren(*this);