solidity/test/cmdlineTests/storage_layout_user_defined/input.sol
hrkrshnn 6109b5c3a1 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.
2021-09-29 11:41:47 +02:00

17 lines
256 B
Solidity

// SPDX-License-Identifier: GPL v3
type MyInt128 is int128;
type MyInt8 is int8;
contract C {
// slot 0
MyInt128 a;
MyInt128 b;
// slot 1
MyInt128 c;
MyInt8 d;
MyInt8 e;
MyInt8 f;
MyInt8 g;
// slot 2
MyInt8 h;
}