mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix bug in typechecking when comparing rational literals
This commit is contained in:
@@ -839,10 +839,10 @@ TypePointer RationalNumberType::binaryOperatorResult(Token::Value _operator, Typ
|
||||
{
|
||||
if (_other->category() == Category::Integer || _other->category() == Category::FixedPoint)
|
||||
{
|
||||
auto mobile = mobileType();
|
||||
if (!mobile)
|
||||
auto commonType = Type::commonType(shared_from_this(), _other);
|
||||
if (!commonType)
|
||||
return TypePointer();
|
||||
return mobile->binaryOperatorResult(_operator, _other);
|
||||
return commonType->binaryOperatorResult(_operator, _other);
|
||||
}
|
||||
else if (_other->category() != category())
|
||||
return TypePointer();
|
||||
|
||||
Reference in New Issue
Block a user