diff options
author | chriseth <c@ethdev.com> | 2016-05-20 22:22:31 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-05-20 22:52:40 +0800 |
commit | 708129abd5f67838913dd42df590b3b64a825e3a (patch) | |
tree | e1062211ac6c28f1b6a3beb6ab26ef0b28e34759 /libsolidity/ast | |
parent | a09583a2a49344034e8be22be91a4410f2982781 (diff) | |
download | dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.gz dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.tar.zst dexon-solidity-708129abd5f67838913dd42df590b3b64a825e3a.zip |
Fixes for invalid cleanups for small types.
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; |