UserDefinedValueType.storageBytes() is correctly set

Previously it returned 32 bytes for all types, which was wasteful. This commit changes it to return
the storage bytes of the underlying type.
This commit is contained in:
hrkrshnn
2021-09-28 12:32:43 +02:00
parent ee0e3e9377
commit 62010d0ebd
8 changed files with 267 additions and 1 deletions
+2
View File
@@ -1108,6 +1108,8 @@ public:
bool leftAligned() const override { return underlyingType().leftAligned(); }
bool canBeStored() const override { return underlyingType().canBeStored(); }
u256 storageSize() const override { return underlyingType().storageSize(); }
unsigned storageBytes() const override { return underlyingType().storageBytes(); }
bool isValueType() const override
{
solAssert(underlyingType().isValueType(), "");