diff options
author | chriseth <chris@ethereum.org> | 2018-09-04 22:24:21 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-09-05 00:19:00 +0800 |
commit | 624dbbe142fb04fdcdd83d843a00138eed296763 (patch) | |
tree | cae35a87edd37136bee36c234cea50895eea9c81 /test/libsolidity/syntaxTests | |
parent | 9daac90cf7d0a28f5d631b9f5234e4268b5b61b7 (diff) | |
download | dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.tar dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.tar.gz dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.tar.bz2 dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.tar.lz dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.tar.xz dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.tar.zst dexon-solidity-624dbbe142fb04fdcdd83d843a00138eed296763.zip |
Fix abi.decode returning single value.
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r-- | test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_empty.sol | 7 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_single_return.sol | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_empty.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_empty.sol new file mode 100644 index 00000000..9972f01d --- /dev/null +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_empty.sol @@ -0,0 +1,7 @@ +contract C { + function f() public pure { + abi.decode("abc", ()); + } +} +// ---- +// Warning: (52-73): Statement has no effect. diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_single_return.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_single_return.sol new file mode 100644 index 00000000..654b7873 --- /dev/null +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_single_return.sol @@ -0,0 +1,5 @@ +contract C { + function f() public pure returns (bool) { + return abi.decode("abc", (uint)) == 2; + } +} |