aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-07-13 19:20:39 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-08-01 20:31:04 +0800
commit30d9961efb7c0056a2b189b642489bee92048442 (patch)
tree5da02f7a064b882c64a0a8422cac6e99c6cbc4ca /libsolidity/analysis
parentce99a5ce7f98b3dfb86ea8397a5117332af33f2a (diff)
downloaddexon-solidity-30d9961efb7c0056a2b189b642489bee92048442.tar.gz
dexon-solidity-30d9961efb7c0056a2b189b642489bee92048442.tar.zst
dexon-solidity-30d9961efb7c0056a2b189b642489bee92048442.zip
Do not exclude public state variables when looking for conflicting declarations.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/DeclarationContainer.cpp9
1 files changed, 1 insertions, 8 deletions
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<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)