diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 9dd3cd5e9..ebe935502 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -1408,7 +1408,7 @@ BoolResult StringLiteralType::isImplicitlyConvertibleTo(Type const& _convertTo) return arrayType->isByteArray() && !(arrayType->dataStoredIn(DataLocation::Storage) && arrayType->isPointer()) && - !(arrayType->isString() && !isValidUTF8()); + !(arrayType->isString() && !util::validateUTF8(value())); else return false; } @@ -1442,11 +1442,6 @@ TypePointer StringLiteralType::mobileType() const return TypeProvider::stringMemory(); } -bool StringLiteralType::isValidUTF8() const -{ - return util::validateUTF8(m_value); -} - FixedBytesType::FixedBytesType(unsigned _bytes): m_bytes(_bytes) { solAssert( diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 938b3f886..9b32475ca 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -629,8 +629,6 @@ public: std::string toString(bool) const override; TypePointer mobileType() const override; - bool isValidUTF8() const; - std::string const& value() const { return m_value; } protected: