Report error for user functions in parameter expressions.

Constant user functions aren't currently supported. A suitable
error message should be output when a user function call is
encountered in a parameter expression. This got lost in the
parameter expression rework.
This commit is contained in:
Martin Whitaker 2010-12-06 20:27:27 +00:00 committed by Stephen Williams
parent b89ab1f2b0
commit 6ce96ccb68
1 changed files with 1 additions and 1 deletions

View File

@ -1524,7 +1524,7 @@ NetExpr* PECallFunction::elaborate_expr(Design*des, NetScope*scope,
// We do not currently support constant user function and
// this is where things fail because of that, though we
// don't know for sure so we need to display both messages.
if (need_constant_expr) {
if (need_constant_expr || is_param_expr) {
cerr << get_fileline() << ": sorry: constant user "
"functions are not currently supported: "
<< path_ << "()." << endl << " or" << endl;