diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-14 06:14:58 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-14 06:16:15 +0800 |
commit | 9a879202e18c1523db7fe8e742e35391e1afe763 (patch) | |
tree | e11d2d2cded4bd213e1775e5175a7b3ac5ecedb7 /Types.cpp | |
parent | fbd39323afbe78a8693bfc2c8c3ffa0f071a2f2a (diff) | |
download | dexon-solidity-9a879202e18c1523db7fe8e742e35391e1afe763.tar.gz dexon-solidity-9a879202e18c1523db7fe8e742e35391e1afe763.tar.zst dexon-solidity-9a879202e18c1523db7fe8e742e35391e1afe763.zip |
Explicit conversion from int to Enum
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -156,7 +156,9 @@ bool IntegerType::isExplicitlyConvertibleTo(Type const& _convertTo) const StaticStringType const& convertTo = dynamic_cast<StaticStringType const&>(_convertTo); return isHash() && (m_bits == convertTo.getNumBytes() * 8); } - return _convertTo.getCategory() == getCategory() || _convertTo.getCategory() == Category::Contract; + return _convertTo.getCategory() == getCategory() || + _convertTo.getCategory() == Category::Contract || + _convertTo.getCategory() == Category::Enum; } TypePointer IntegerType::unaryOperatorResult(Token::Value _operator) const |