Disallow array slicing for arrays with dyanmically encoded base types.

This commit is contained in:
Daniel Kirchner
2020-05-13 15:52:22 +02:00
parent b2122d479f
commit 6f04664cfa
9 changed files with 53 additions and 6 deletions
+1
View File
@@ -1599,6 +1599,7 @@ string YulUtilFunctions::conversionFunction(Type const& _from, Type const& _to)
ArraySliceType const& fromType = dynamic_cast<ArraySliceType const&>(_from);
ArrayType const& targetType = dynamic_cast<ArrayType const&>(_to);
solAssert(!fromType.arrayType().baseType()->isDynamicallyEncoded(), "");
solAssert(
*fromType.arrayType().baseType() == *targetType.baseType(),
"Converting arrays of different type is not possible"