mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
@@ -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(), "");
|
||||
|
||||
Reference in New Issue
Block a user