mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9118 from ethereum/develop
Merge develop into breaking.
This commit is contained in:
@@ -481,7 +481,12 @@ void OverrideChecker::checkIllegalOverrides(ContractDefinition const& _contract)
|
||||
for (auto const* stateVar: _contract.stateVariables())
|
||||
{
|
||||
if (!stateVar->isPublic())
|
||||
{
|
||||
if (stateVar->overrides())
|
||||
m_errorReporter.typeError(8022_error, stateVar->location(), "Override can only be used with public state variables.");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (contains_if(inheritedMods, MatchByName{stateVar->name()}))
|
||||
m_errorReporter.typeError(1456_error, stateVar->location(), "Override changes modifier to public state variable.");
|
||||
|
||||
Reference in New Issue
Block a user