Describe the bug
slang does not allow using keyword this in class property initialization. But it should be legal.
To Reproduce
the code test.sv:
typedef class B;
class A;
B b;
function new(B b);
this.b = b;
endfunction
endclass
class B;
A a = new(this);
endclass
module test;
B b = new();
endmodule
run slang test.sv:
Top level design units:
test
test.sv:10:13: error: invalid use of 'this' outside of a non-static method
A a = new(this);
^~~~
Build failed: 1 error, 0 warnings
Describe the bug slang does not allow using keyword
this
in class property initialization. But it should be legal.To Reproduce the code test.sv:
run
slang test.sv
: