[SMTChecker] Use same sort name for array slice as for the underlying array.

This commit is contained in:
Martin Blicha
2021-03-09 11:06:22 +01:00
parent 1d95f95635
commit 5af01f6896
5 changed files with 30 additions and 4 deletions
+3 -3
View File
@@ -93,14 +93,14 @@ SortPointer smtSort(frontend::Type const& _type)
}
string tupleName;
auto sliceArrayType = dynamic_cast<ArraySliceType const*>(&_type);
ArrayType const* arrayType = sliceArrayType ? &sliceArrayType->arrayType() : dynamic_cast<ArrayType const*>(&_type);
if (
auto arrayType = dynamic_cast<ArrayType const*>(&_type);
(arrayType && (arrayType->isString() || arrayType->isByteArray())) ||
_type.category() == frontend::Type::Category::ArraySlice ||
_type.category() == frontend::Type::Category::StringLiteral
)
tupleName = "bytes";
else if (auto arrayType = dynamic_cast<ArrayType const*>(&_type))
else if (arrayType)
{
auto baseType = arrayType->baseType();
// Solidity allows implicit conversion also when assigning arrays.