mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not exclude public state variables when looking for conflicting declarations.
This commit is contained in:
@@ -49,16 +49,9 @@ Declaration const* DeclarationContainer::conflictingDeclaration(
|
||||
dynamic_cast<MagicVariableDeclaration const*>(&_declaration)
|
||||
)
|
||||
{
|
||||
// check that all other declarations with the same name are functions or a public state variable or events.
|
||||
// And then check that the signatures are different.
|
||||
// check that all other declarations are of the same kind
|
||||
for (Declaration const* declaration: declarations)
|
||||
{
|
||||
if (auto variableDeclaration = dynamic_cast<VariableDeclaration const*>(declaration))
|
||||
{
|
||||
if (variableDeclaration->isStateVariable() && !variableDeclaration->isConstant() && variableDeclaration->isPublic())
|
||||
continue;
|
||||
return declaration;
|
||||
}
|
||||
if (
|
||||
dynamic_cast<FunctionDefinition const*>(&_declaration) &&
|
||||
!dynamic_cast<FunctionDefinition const*>(declaration)
|
||||
|
||||
Reference in New Issue
Block a user