Fix 'void(' mis-throwing assertion
This commit is contained in:
parent
27558c9349
commit
dc00bf2484
|
|
@ -3583,8 +3583,8 @@ statement_item<nodeStmtp>: // IEEE: statement_item
|
|||
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
||||
$6->fileline(newfl);
|
||||
$$ = exprp->makeStmt(); }
|
||||
| yVOID yP_TICK '(' system_t_stmt_call ')' ';'
|
||||
{ $$ = $4;
|
||||
| yVOID yP_TICK '(' system_f_only_expr_call ')' ';'
|
||||
{ $$ = new AstStmtExpr{$<fl>4, $4};
|
||||
FileLine* const newfl = new FileLine{$$->fileline()};
|
||||
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
||||
$$->fileline(newfl); }
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ module t;
|
|||
i = $cast(bao, b);
|
||||
if (i != 0) $stop;
|
||||
if (bao != ba) $stop; // Unchanged
|
||||
void'($cast(bao, b)); // Ok as is function
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[0] %Error: t_castdyn_run_bad.v:35: Assertion failed in top.t: '$cast' failed.
|
||||
%Error: t/t_castdyn_run_bad.v:35: Verilog $stop
|
||||
[0] %Error: t_castdyn_run_bad.v:36: Assertion failed in top.t: '$cast' failed.
|
||||
%Error: t/t_castdyn_run_bad.v:36: Verilog $stop
|
||||
Aborting...
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ module t;
|
|||
b = bb;
|
||||
i = $cast(ba1, b);
|
||||
if (i != 0) $stop;
|
||||
void'($cast(ba1, b)); // ok as is function
|
||||
$cast(ba1, b); // <-- Bad $cast task
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue