diff --git a/src/verilog.y b/src/verilog.y index ceb54f11c..0aae0da4b 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -3459,7 +3459,7 @@ function_subroutine_callNoMethod: // IEEE: function_subroutine_call (as f // // We implement randomize as a normal funcRef, since randomize isn't a keyword // // Note yNULL is already part of expressions, so they come for free | funcRef yWITH__CUR constraint_block { $$ = $1; BBUNSUP($2, "Unsupported: randomize() 'with' constraint"); } - | funcRef yWITH__CUR '{' '}' { $$ = $1; BBUNSUP($2, "Unsupported: randomize() 'with'"); } + | funcRef yWITH__CUR '{' '}' { $$ = new AstWith($2, false, $1, NULL); } ; system_t_call: // IEEE: system_tf_call (as task) diff --git a/test_regress/t/t_randomize.out b/test_regress/t/t_randomize.out index 9224cf088..f508c1cd0 100644 --- a/test_regress/t/t_randomize.out +++ b/test_regress/t/t_randomize.out @@ -34,7 +34,4 @@ %Error-UNSUPPORTED: t/t_randomize.v:30:4: Unsupported: constraint 30 | constraint dis { | ^~~~~~~~~~ -%Error-UNSUPPORTED: t/t_randomize.v:50:25: Unsupported: randomize() 'with' - 50 | v = p.randomize() with {}; - | ^~~~ %Error: Exiting due to