Variable shadowing occurs when a variable declared within a certain scope (decision block, method, or inner class) has the same name as a variable declared in an outer scope.
This depends a lot on the code of the contract itself. For instance, in the this example, variable shadowing prevents the owner of contract C
from performing self destruct
The solidity compiler has some checks to emit warnings when it detects this kind of issue, but it has known examples where it fails.