mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Unary minus is not implemented for fixed point type
This commit is contained in:
@@ -453,6 +453,10 @@ bool ExpressionCompiler::visit(UnaryOperation const& _unaryOperation)
|
||||
// unary add, so basically no-op
|
||||
break;
|
||||
case Token::Sub: // -
|
||||
solUnimplementedAssert(
|
||||
type.category() != Type::Category::FixedPoint,
|
||||
"Not yet implemented - FixedPointType."
|
||||
);
|
||||
if (m_context.arithmetic() == Arithmetic::Checked)
|
||||
m_context.callYulFunction(m_context.utilFunctions().negateNumberCheckedFunction(type), 1, 1);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user