Looking at section 8.25 Parametrized class in LRM, there is another way to override the base class parameter from extended class.
class D4 #(type P = C#(real)) extends P; // for default, T is real
// I am assuming C#(real) overrides the base class Type.
I dont think that is happening in the below code.
typedef enum {ADD,SUB,MUL} opcode;
class A#(type T=int);
T sub;
endclass
class B #(type Q = A#(real)) extends A;
Q mux;
endclass
module tb;
B #(real)a1;
A base;
initial begin
a1 = new();
base = new();
a1.mux =10.23;
base.sub = 10.45;
$display ("Mux value in class B is %f",a1.mux);
$display ("Sub value in class Base is %0.3f",(base.sub));
end
endmodule