Disallow multiple events with same name and types.

This commit is contained in:
chriseth
2020-07-13 11:24:37 +02:00
parent 7a4cab38fc
commit ab2f64f442
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);
}