mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1218 from ethereum/null-integer-type
Add a null-pointer check
This commit is contained in:
commit
1584c5992e
@ -574,7 +574,11 @@ bool RationalNumberType::isImplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
FixedBytesType const& fixedBytes = dynamic_cast<FixedBytesType const&>(_convertTo);
|
||||
if (!isFractional())
|
||||
{
|
||||
if (integerType())
|
||||
return fixedBytes.numBytes() * 8 >= integerType()->numBits();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user