In reply to basarts:
It would help to show a complete example and what different interpretations you are seeing from you you were expecting.
Note that I think you have declared two different parameters X. When you declare A::X, it hides B::X from direct access.
module top;
class B #(parameter X = 2) ;
function new;
$display("B::X: %d",X);
endfunction
endclass
class A #(parameter X = 2) extends B #(.X(1));
function new;
$display("A::X: %d B::X: %d",X,B::X);
endfunction
endclass
A#(3) a = new;
endmodule
# B::X: 1
# A::X: 3 B::X: 1