diff options
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 5 | ||||
-rw-r--r-- | libsolidity/ast/Types.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 79e5bb02..01d1cb37 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -638,6 +638,11 @@ TypePointer FixedBytesType::binaryOperatorResult(Token::Value _operator, TypePoi return TypePointer(); } +MemberList::MemberMap FixedBytesType::nativeMembers(const ContractDefinition*) const +{ + return MemberList::MemberMap{MemberList::Member{"length", make_shared<IntegerType>(8)}}; +} + bool FixedBytesType::operator==(Type const& _other) const { if (_other.category() != category()) diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 723d633b..90a0509b 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -399,6 +399,7 @@ public: virtual bool isValueType() const override { return true; } virtual std::string toString(bool) const override { return "bytes" + dev::toString(m_bytes); } + virtual MemberList::MemberMap nativeMembers(ContractDefinition const*) const override; virtual TypePointer encodingType() const override { return shared_from_this(); } virtual TypePointer interfaceType(bool) const override { return shared_from_this(); } |