diff options
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/DeclarationContainer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libsolidity/analysis/DeclarationContainer.cpp b/libsolidity/analysis/DeclarationContainer.cpp index f8c12c5b..ac80ab18 100644 --- a/libsolidity/analysis/DeclarationContainer.cpp +++ b/libsolidity/analysis/DeclarationContainer.cpp @@ -58,6 +58,13 @@ Declaration const* DeclarationContainer::conflictingDeclaration( return declaration; } } + else if (dynamic_cast<EventDefinition const*>(&_declaration)) + { + // check that all other declarations with the same name are events + for (Declaration const* declaration: declarations) + if (!dynamic_cast<EventDefinition const*>(declaration)) + return declaration; + } else if (declarations.size() == 1 && declarations.front() == &_declaration) return nullptr; else if (!declarations.empty()) |