mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Negative numbers do not have to be atoms
This commit is contained in:
parent
779db2d84f
commit
4b50f26834
@ -499,7 +499,15 @@ std::optional<std::string> Predicate::expressionToString(smtutil::Expression con
|
|||||||
if (smt::isNumber(*_type))
|
if (smt::isNumber(*_type))
|
||||||
{
|
{
|
||||||
solAssert(_expr.sort->kind == Kind::Int, "");
|
solAssert(_expr.sort->kind == Kind::Int, "");
|
||||||
solAssert(_expr.arguments.empty(), "");
|
solAssert(_expr.arguments.empty() || _expr.name == "-", "");
|
||||||
|
|
||||||
|
if (_expr.name == "-")
|
||||||
|
{
|
||||||
|
solAssert(_expr.arguments.size() == 1);
|
||||||
|
smtutil::Expression const& val = _expr.arguments[0];
|
||||||
|
solAssert(val.sort->kind == Kind::Int && val.arguments.empty());
|
||||||
|
return "(- " + val.name + ")";
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
_type->category() == Type::Category::Address ||
|
_type->category() == Type::Category::Address ||
|
||||||
|
Loading…
Reference in New Issue
Block a user