mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow explicit fixed->enum, but allow bytes->fixed.
This commit is contained in:
parent
ef7049f9a6
commit
4dfe9a216c
@ -395,7 +395,6 @@ bool FixedPointType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
return _convertTo.category() == category() ||
|
||||
_convertTo.category() == Category::Integer ||
|
||||
_convertTo.category() == Category::Enum ||
|
||||
_convertTo.category() == Category::FixedBytes;
|
||||
}
|
||||
|
||||
@ -859,6 +858,7 @@ bool FixedBytesType::isImplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
bool FixedBytesType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
return _convertTo.category() == Category::Integer ||
|
||||
_convertTo.category() == Category::FixedPoint ||
|
||||
_convertTo.category() == Category::Contract ||
|
||||
_convertTo.category() == category();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user