mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Explicit conversion from int to Enum
This commit is contained in:
parent
fbd39323af
commit
9a879202e1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user