100 Days Of Solidity, Shadowing State Variables, Inherited State Variables, Learn Solidity.
getName() public view returns (string memory) { return name; } } contract C is A { constructor() { name = "Contract C"; } // C.getName returns "Contract C" } In this example, Contract C overrides the inherited `name` state variable correctly. Inside the constructor of Contract C, we simply assign a