Solidity allows for ambiguous naming of state variables when inheritance is used. Contract A
with a variable x
could inherit contract B
which also has a state variable x
defined. This would result in two separate versions of x
, one of them being accessed from contract A
and the other one from contract B
. In more complex contract systems this condition could go unnoticed and subsequently lead to security issues.
Review storage variable layouts for your contract systems carefully and remove any ambiguities. Always check for compiler warnings as they can flag the issue within a single contract.