Hi All,
I am writing following program in System Verilog
class base;
int a = 5;
endclass
class extend extends base;
int b = 1;
endclass
module test;
initial begin
base m_base;
extend m_extend;
m_base = new();
m_extend = new();
m_base = m_extend;
$display(m_base.b);
end
endmodule
It gives me Error,
Error-[MFNF] Member not found
testbench.sv, 18
“m_base.”
Could not find member ‘b’ in class ‘base’, at “testbench.sv”, 1.
I am not able to understand why it is giving such error