aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-14 06:14:58 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-14 06:16:15 +0800
commit9a879202e18c1523db7fe8e742e35391e1afe763 (patch)
treee11d2d2cded4bd213e1775e5175a7b3ac5ecedb7 /Types.cpp
parentfbd39323afbe78a8693bfc2c8c3ffa0f071a2f2a (diff)
downloaddexon-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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Types.cpp b/Types.cpp
index c4a808f8..c29873b1 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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