In reply to verif_learner:
class DerivedC extends baseC;
extern virtual function void func1;
extern function void func2;
endclass
function void DerivedC::func1;
$display ("func1 in DerivedC");
func2; //**here means this.func2, if we use super.func2 then the result will be different**
endfunction
function void DerivedC::func2;
$display ("func2 in DerivedC");
endfunction
BaseC P1 ;
DerivedC P2 = new;
initial begin
P1 = P2;
P1.func1;
end
just as the dave said, here use the implicit this class variable, so the result is func2 in DerivedC. I try to use super.func2, the result is func2 in baseC.
thanks
best regards