Merge pull request #7142 from ethereum/smt_init_numbers

[SMTChecker] Initialize all number types with 0
This commit is contained in:
Leonardo 2019-07-29 10:19:17 +02:00 committed by GitHub
commit 0197a200cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,7 +258,7 @@ void setSymbolicZeroValue(SymbolicVariable const& _variable, EncodingContext& _c
void setSymbolicZeroValue(Expression _expr, solidity::TypePointer const& _type, EncodingContext& _context)
{
solAssert(_type, "");
if (isInteger(_type->category()))
if (isNumber(_type->category()))
_context.addAssertion(_expr == 0);
else if (isBool(_type->category()))
_context.addAssertion(_expr == Expression(false));