mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Support contract type
This commit is contained in:
@@ -134,7 +134,7 @@ pair<bool, shared_ptr<SymbolicVariable>> dev::solidity::newSymbolicVariable(
|
||||
solAssert(fixedBytesType, "");
|
||||
var = make_shared<SymbolicFixedBytesVariable>(fixedBytesType->numBytes(), _uniqueName, _solver);
|
||||
}
|
||||
else if (isAddress(_type.category()))
|
||||
else if (isAddress(_type.category()) || isContract(_type.category()))
|
||||
var = make_shared<SymbolicAddressVariable>(_uniqueName, _solver);
|
||||
else if (isEnum(_type.category()))
|
||||
var = make_shared<SymbolicEnumVariable>(type, _uniqueName, _solver);
|
||||
@@ -186,6 +186,11 @@ bool dev::solidity::isAddress(Type::Category _category)
|
||||
return _category == Type::Category::Address;
|
||||
}
|
||||
|
||||
bool dev::solidity::isContract(Type::Category _category)
|
||||
{
|
||||
return _category == Type::Category::Contract;
|
||||
}
|
||||
|
||||
bool dev::solidity::isEnum(Type::Category _category)
|
||||
{
|
||||
return _category == Type::Category::Enum;
|
||||
@@ -197,6 +202,7 @@ bool dev::solidity::isNumber(Type::Category _category)
|
||||
isRational(_category) ||
|
||||
isFixedBytes(_category) ||
|
||||
isAddress(_category) ||
|
||||
isContract(_category) ||
|
||||
isEnum(_category);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ bool isInteger(Type::Category _category);
|
||||
bool isRational(Type::Category _category);
|
||||
bool isFixedBytes(Type::Category _category);
|
||||
bool isAddress(Type::Category _category);
|
||||
bool isContract(Type::Category _category);
|
||||
bool isEnum(Type::Category _category);
|
||||
bool isNumber(Type::Category _category);
|
||||
bool isBool(Type::Category _category);
|
||||
|
||||
Reference in New Issue
Block a user