aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-01-23 22:24:47 +0800
committerYoichi Hirai <i@yoichihirai.com>2017-01-23 22:25:13 +0800
commit4e1fd68b38346ec3e4117dc0454b65f4b236741b (patch)
tree857511acb678ab58a09ad3b23d7dc58353299d3c /libsolidity/analysis
parent3d8b56c2a4b3f3f29de7b9804c85a10d077502f8 (diff)
downloaddexon-solidity-4e1fd68b38346ec3e4117dc0454b65f4b236741b.tar.gz
dexon-solidity-4e1fd68b38346ec3e4117dc0454b65f4b236741b.tar.zst
dexon-solidity-4e1fd68b38346ec3e4117dc0454b65f4b236741b.zip
analysis: disallow overloading functions with events
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/DeclarationContainer.cpp7
1 files changed, 6 insertions, 1 deletions
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<FunctionDefinition const*>(declaration) &&
+ dynamic_cast<FunctionDefinition const*>(&_declaration) &&
+ !dynamic_cast<FunctionDefinition const*>(declaration)
+ )
+ return declaration;
+ if (
+ dynamic_cast<EventDefinition const*>(&_declaration) &&
!dynamic_cast<EventDefinition const*>(declaration)
)
return declaration;