diff options
author | chriseth <chris@ethereum.org> | 2018-09-05 05:47:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 05:47:56 +0800 |
commit | e6aa15bae1839ce6761c75521e0166c06469dc2e (patch) | |
tree | 76969e415aa662d6d885bf41b6f938a04a986add /test/libsolidity/syntaxTests | |
parent | 85debe77d9b616a37ecf0ed080045b3747b3aa7d (diff) | |
parent | 624dbbe142fb04fdcdd83d843a00138eed296763 (diff) | |
download | dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.tar dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.tar.gz dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.tar.bz2 dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.tar.lz dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.tar.xz dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.tar.zst dexon-solidity-e6aa15bae1839ce6761c75521e0166c06469dc2e.zip |
Merge pull request #4895 from ethereum/abidecodesingle
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; + } +} |