diff --git a/ivtest/ivltests/sv_class_method_lt_static1.v b/ivtest/ivltests/sv_class_method_lt_static1.v new file mode 100644 index 000000000..73bdb65bc --- /dev/null +++ b/ivtest/ivltests/sv_class_method_lt_static1.v @@ -0,0 +1,18 @@ +// Check that specifing static lifetime for a class method taks results in an +// error. + +module test; + + class C; + // This should fail, all class methods have automatic lifetime + task static t(int x); + int y; + y = 2 * x; + endtask + endclass + + initial begin + $display("FAILED"); + end + +endmodule diff --git a/ivtest/ivltests/sv_class_method_lt_static2.v b/ivtest/ivltests/sv_class_method_lt_static2.v new file mode 100644 index 000000000..762747642 --- /dev/null +++ b/ivtest/ivltests/sv_class_method_lt_static2.v @@ -0,0 +1,19 @@ +// Check that specifing static lifetime for a class method function results in +// an error. + +module test; + + class C; + // This should fail, all class methods have automatic lifetime + function static int t(int x); + int y; + y = 2 * x; + return y; + endfunction + endclass + + initial begin + $display("FAILED"); + end + +endmodule diff --git a/ivtest/regress-sv.list b/ivtest/regress-sv.list index 060e06281..a87c17491 100644 --- a/ivtest/regress-sv.list +++ b/ivtest/regress-sv.list @@ -565,6 +565,8 @@ sv_class_in_module_decl normal,-g2009 ivltests sv_class_method_call_void normal,-g2009 ivltests sv_class_method_default1 normal,-g2009 ivltests sv_class_method_default2 normal,-g2009 ivltests +sv_class_method_lt_static1 CE,-g2009 ivltests +sv_class_method_lt_static2 CE,-g2009 ivltests sv_class_method_signed1 normal,-g2009 ivltests sv_class_method_signed2 normal,-g2009 ivltests sv_class_method_var_init normal,-g2009 ivltests