Skip to content

Commit d808302

Browse files
authored
Merge pull request ethereum#9438 from ethereum/fix_event_type
Set type properly for event definition subexpressions
2 parents e1a45ee + 2e1067a commit d808302

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Compiler Features:
1111
Bugfixes:
1212
* SMTChecker: Fix internal error when using bitwise operators on fixed bytes type.
1313
* SMTChecker: Fix internal error when using compound bitwise operator assignments on array indices inside branches.
14+
* SMTChecker: Fix error in events with indices of type static array.
1415
* Type Checker: Fix overload resolution in combination with ``{value: ...}``.
1516
* Type Checker: Fix internal compiler error related to oversized types.
1617
* Code Generator: Avoid double cleanup when copying to memory.

libsolidity/analysis/TypeChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ bool TypeChecker::visit(EventDefinition const& _eventDef)
664664
m_errorReporter.typeError(8598_error, _eventDef.location(), "More than 4 indexed arguments for anonymous event.");
665665
else if (!_eventDef.isAnonymous() && numIndexed > 3)
666666
m_errorReporter.typeError(7249_error, _eventDef.location(), "More than 3 indexed arguments for event.");
667-
return false;
667+
return true;
668668
}
669669

670670
void TypeChecker::endVisit(FunctionTypeName const& _funType)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pragma experimental SMTChecker;
2+
contract a { event b(uint[(1 / 1)]); }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
contract a { event b(uint[(1 / 1)]); }

0 commit comments

Comments
 (0)