From 30d9961efb7c0056a2b189b642489bee92048442 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Fri, 13 Jul 2018 13:20:39 +0200 Subject: Do not exclude public state variables when looking for conflicting declarations. --- libsolidity/analysis/DeclarationContainer.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'libsolidity/analysis') diff --git a/libsolidity/analysis/DeclarationContainer.cpp b/libsolidity/analysis/DeclarationContainer.cpp index 9e2bf6d3..59a3d522 100644 --- a/libsolidity/analysis/DeclarationContainer.cpp +++ b/libsolidity/analysis/DeclarationContainer.cpp @@ -49,16 +49,9 @@ Declaration const* DeclarationContainer::conflictingDeclaration( dynamic_cast(&_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(declaration)) - { - if (variableDeclaration->isStateVariable() && !variableDeclaration->isConstant() && variableDeclaration->isPublic()) - continue; - return declaration; - } if ( dynamic_cast(&_declaration) && !dynamic_cast(declaration) -- cgit v1.2.3