diff options
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/AST.cpp | 12 | ||||
-rw-r--r-- | libsolidity/ast/Types.cpp | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 2e4ae72a..a805322b 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -176,11 +176,19 @@ vector<EventDefinition const*> const& ContractDefinition::interfaceEvents() cons m_interfaceEvents.reset(new vector<EventDefinition const*>()); for (ContractDefinition const* contract: annotation().linearizedBaseContracts) for (EventDefinition const* e: contract->events()) - if (eventsSeen.count(e->name()) == 0) + { + /// NOTE: this requires the "internal" version of an Event, + /// though here internal strictly refers to visibility, + /// and not to function encoding (jump vs. call) + auto const& function = e->functionType(true); + solAssert(function, ""); + string eventSignature = function->externalSignature(); + if (eventsSeen.count(eventSignature) == 0) { - eventsSeen.insert(e->name()); + eventsSeen.insert(eventSignature); m_interfaceEvents->push_back(e); } + } } return *m_interfaceEvents; } diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 22751c45..10424858 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -304,6 +304,9 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ContractDefinition return members; } +namespace +{ + bool isValidShiftAndAmountType(Token::Value _operator, Type const& _shiftAmountType) { // Disable >>> here. @@ -317,6 +320,8 @@ bool isValidShiftAndAmountType(Token::Value _operator, Type const& _shiftAmountT return false; } +} + IntegerType::IntegerType(int _bits, IntegerType::Modifier _modifier): m_bits(_bits), m_modifier(_modifier) { |