diff options
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 13 | ||||
-rw-r--r-- | libsolidity/ast/Types.h | 1 |
2 files changed, 0 insertions, 14 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index d989cb06..e964d683 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -923,19 +923,6 @@ bool FixedBytesType::operator==(Type const& _other) const return other.m_bytes == m_bytes; } -bool BoolType::isExplicitlyConvertibleTo(Type const& _convertTo) const -{ - // conversion to integer is fine, but not to address - // this is an example of explicit conversions being not transitive (though implicit should be) - if (_convertTo.category() == category()) - { - IntegerType const& convertTo = dynamic_cast<IntegerType const&>(_convertTo); - if (!convertTo.isAddress()) - return true; - } - return isImplicitlyConvertibleTo(_convertTo); -} - u256 BoolType::literalValue(Literal const* _literal) const { solAssert(_literal, ""); diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 0c437316..967e968c 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -470,7 +470,6 @@ class BoolType: public Type public: BoolType() {} virtual Category category() const override { return Category::Bool; } - virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override; virtual TypePointer unaryOperatorResult(Token::Value _operator) const override; virtual TypePointer binaryOperatorResult(Token::Value _operator, TypePointer const& _other) const override; |