From 4e1fd68b38346ec3e4117dc0454b65f4b236741b Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Mon, 23 Jan 2017 15:24:47 +0100 Subject: analysis: disallow overloading functions with events --- libsolidity/analysis/DeclarationContainer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libsolidity/analysis/DeclarationContainer.cpp b/libsolidity/analysis/DeclarationContainer.cpp index 7e8cd2ca..b33c8568 100644 --- a/libsolidity/analysis/DeclarationContainer.cpp +++ b/libsolidity/analysis/DeclarationContainer.cpp @@ -58,7 +58,12 @@ Declaration const* DeclarationContainer::conflictingDeclaration( return declaration; } if ( - !dynamic_cast(declaration) && + dynamic_cast(&_declaration) && + !dynamic_cast(declaration) + ) + return declaration; + if ( + dynamic_cast(&_declaration) && !dynamic_cast(declaration) ) return declaration; -- cgit