aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-07 23:01:37 +0800
committerchriseth <c@ethdev.com>2015-10-07 23:01:37 +0800
commit68bf6e60c5869ab1cb862674de44e5ab4c79b5bc (patch)
tree0258f82a5930fd7c4aa62a63039d99b9807b46d8 /libsolidity
parent8644ad686674edfd2205fb9624521692362d6bfa (diff)
parentb6ddde9372c897c1eafc24ee16e3aa6aeec3f2f6 (diff)
downloaddexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar
dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.gz
dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.bz2
dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.lz
dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.xz
dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.zst
dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.zip
Merge pull request #122 from chriseth/anonymousEventsWithFourIndexedParams
Allow four indexed arguments for anynomous events.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/TypeChecker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/TypeChecker.cpp b/libsolidity/TypeChecker.cpp
index fe6fb970..2afa5649 100644
--- a/libsolidity/TypeChecker.cpp
+++ b/libsolidity/TypeChecker.cpp
@@ -554,7 +554,9 @@ bool TypeChecker::visit(EventDefinition const& _eventDef)
{
if (var->isIndexed())
numIndexed++;
- if (numIndexed > 3)
+ if (_eventDef.isAnonymous() && numIndexed > 4)
+ typeError(_eventDef, "More than 4 indexed arguments for anonymous event.");
+ else if (!_eventDef.isAnonymous() && numIndexed > 3)
typeError(_eventDef, "More than 3 indexed arguments for event.");
if (!type(*var)->canLiveOutsideStorage())
typeError(*var, "Type is required to live outside storage.");