diff options
author | chriseth <chris@ethereum.org> | 2018-04-05 21:52:25 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-04-12 22:37:16 +0800 |
commit | 75b88286667690ffb4a5e079665ed8b70bcaeb87 (patch) | |
tree | ee0952b521768895b329f3e91dfa0a98eb2b4cef /test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs_abiv2.sol | |
parent | 7343c4028365d3fbc9fa46fca6078971a2bed426 (diff) | |
download | dexon-solidity-75b88286667690ffb4a5e079665ed8b70bcaeb87.tar.gz dexon-solidity-75b88286667690ffb4a5e079665ed8b70bcaeb87.tar.zst dexon-solidity-75b88286667690ffb4a5e079665ed8b70bcaeb87.zip |
Allow struct encoding with new encoder.
Diffstat (limited to 'test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs_abiv2.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs_abiv2.sol | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs_abiv2.sol b/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs_abiv2.sol new file mode 100644 index 00000000..d6cf60e4 --- /dev/null +++ b/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs_abiv2.sol @@ -0,0 +1,18 @@ +pragma experimental ABIEncoderV2; + +contract C { + struct S { uint x; } + S s; + struct T { uint y; } + T t; + function f() public view { + abi.encode(s, t); + } + function g() public view { + abi.encodePacked(s, t); + } +} +// ---- +// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. +// TypeError: (235-236): This type cannot be encoded. +// TypeError: (238-239): This type cannot be encoded. |