aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-29 04:05:47 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-12 07:03:35 +0800
commita52e0de67c2fad02da43ef645c739632c61c923b (patch)
treec30791874fceec3a7c277462f948197af8a261c7 /libsolidity/analysis
parentfbe24da159452f8b22206b6e750174ed03b43ade (diff)
downloaddexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.tar
dexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.tar.gz
dexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.tar.bz2
dexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.tar.lz
dexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.tar.xz
dexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.tar.zst
dexon-solidity-a52e0de67c2fad02da43ef645c739632c61c923b.zip
Do not show the same error multiple times for events
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index c46485d8..d2151cda 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -698,15 +698,15 @@ bool TypeChecker::visit(EventDefinition const& _eventDef)
{
if (var->isIndexed())
numIndexed++;
- if (_eventDef.isAnonymous() && numIndexed > 4)
- m_errorReporter.typeError(_eventDef.location(), "More than 4 indexed arguments for anonymous event.");
- else if (!_eventDef.isAnonymous() && numIndexed > 3)
- m_errorReporter.typeError(_eventDef.location(), "More than 3 indexed arguments for event.");
if (!type(*var)->canLiveOutsideStorage())
m_errorReporter.typeError(var->location(), "Type is required to live outside storage.");
if (!type(*var)->interfaceType(false))
m_errorReporter.typeError(var->location(), "Internal type is not allowed as event parameter type.");
}
+ if (_eventDef.isAnonymous() && numIndexed > 4)
+ m_errorReporter.typeError(_eventDef.location(), "More than 4 indexed arguments for anonymous event.");
+ else if (!_eventDef.isAnonymous() && numIndexed > 3)
+ m_errorReporter.typeError(_eventDef.location(), "More than 3 indexed arguments for event.");
return false;
}