Merge pull request #9438 from ethereum/fix_event_type

Set type properly for event definition subexpressions
This commit is contained in:
chriseth 2020-07-17 12:15:24 +02:00 committed by GitHub
commit d808302c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,7 @@ Compiler Features:
Bugfixes: Bugfixes:
* SMTChecker: Fix internal error when using bitwise operators on fixed bytes type. * SMTChecker: Fix internal error when using bitwise operators on fixed bytes type.
* SMTChecker: Fix internal error when using compound bitwise operator assignments on array indices inside branches. * SMTChecker: Fix internal error when using compound bitwise operator assignments on array indices inside branches.
* SMTChecker: Fix error in events with indices of type static array.
* Type Checker: Fix overload resolution in combination with ``{value: ...}``. * Type Checker: Fix overload resolution in combination with ``{value: ...}``.
* Type Checker: Fix internal compiler error related to oversized types. * Type Checker: Fix internal compiler error related to oversized types.
* Code Generator: Avoid double cleanup when copying to memory. * Code Generator: Avoid double cleanup when copying to memory.

View File

@ -664,7 +664,7 @@ bool TypeChecker::visit(EventDefinition const& _eventDef)
m_errorReporter.typeError(8598_error, _eventDef.location(), "More than 4 indexed arguments for anonymous event."); m_errorReporter.typeError(8598_error, _eventDef.location(), "More than 4 indexed arguments for anonymous event.");
else if (!_eventDef.isAnonymous() && numIndexed > 3) else if (!_eventDef.isAnonymous() && numIndexed > 3)
m_errorReporter.typeError(7249_error, _eventDef.location(), "More than 3 indexed arguments for event."); m_errorReporter.typeError(7249_error, _eventDef.location(), "More than 3 indexed arguments for event.");
return false; return true;
} }
void TypeChecker::endVisit(FunctionTypeName const& _funType) void TypeChecker::endVisit(FunctionTypeName const& _funType)

View File

@ -0,0 +1,2 @@
pragma experimental SMTChecker;
contract a { event b(uint[(1 / 1)]); }

View File

@ -0,0 +1 @@
contract a { event b(uint[(1 / 1)]); }