mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
No operators on fixed point types beyond comparison.
This commit is contained in:
parent
b41220cec8
commit
584a76cd09
@ -733,8 +733,7 @@ TypeResult FixedPointType::unaryOperatorResult(Token _operator) const
|
|||||||
case Token::Sub:
|
case Token::Sub:
|
||||||
case Token::Inc:
|
case Token::Inc:
|
||||||
case Token::Dec:
|
case Token::Dec:
|
||||||
// for fixed, we allow +, -, ++ and --
|
return TypeResult::err("Arithmetic operators on fixed point types are not yet supported.");
|
||||||
return this;
|
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -795,7 +794,8 @@ TypeResult FixedPointType::binaryOperatorResult(Token _operator, Type const* _ot
|
|||||||
return commonType;
|
return commonType;
|
||||||
if (TokenTraits::isBitOp(_operator) || TokenTraits::isBooleanOp(_operator) || _operator == Token::Exp)
|
if (TokenTraits::isBitOp(_operator) || TokenTraits::isBooleanOp(_operator) || _operator == Token::Exp)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return commonType;
|
|
||||||
|
return TypeResult::err("Arithmetic operators on fixed point types are not yet supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
IntegerType const* FixedPointType::asIntegerType() const
|
IntegerType const* FixedPointType::asIntegerType() const
|
||||||
|
Loading…
Reference in New Issue
Block a user