mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 01:33:07 +02:00
Check that it is possible to both declare and call class constructors without using parenthesis after the `new` keyword. Check that a non-ANSI port for a class constructor results in an error. Check that it is possible to invoke a class task through a implicit class handle (`this` or `super`) without using parenthesis after the task name. Signed-off-by: Lars-Peter Clausen <[email protected]>
15 lines
237 B
Verilog
15 lines
237 B
Verilog
// Check that a class constructor with non-ANSI port results in an error.
|
|
|
|
module test;
|
|
|
|
class C;
|
|
function new;
|
|
input x; // This is a syntax error
|
|
$display("FAILED");
|
|
endfunction
|
|
endclass
|
|
|
|
C c = new;
|
|
|
|
endmodule
|