Merge pull request #9326 from ethereum/eventOverwriting

[BREAKING] Disallow multiple events with same name and types.
This commit is contained in:
chriseth
2020-07-13 15:44:35 +02:00
committed by GitHub
10 changed files with 61 additions and 2 deletions
@@ -120,8 +120,9 @@ void ContractLevelChecker::checkDuplicateEvents(ContractDefinition const& _contr
/// Checks that two events with the same name defined in this contract have different
/// argument types
map<string, vector<EventDefinition const*>> events;
for (EventDefinition const* event: _contract.events())
events[event->name()].push_back(event);
for (auto const* contract: _contract.annotation().linearizedBaseContracts)
for (EventDefinition const* event: contract->events())
events[event->name()].push_back(event);
findDuplicateDefinitions(events);
}