diff options
author | chriseth <chris@ethereum.org> | 2018-05-16 15:46:36 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-05-16 15:48:03 +0800 |
commit | 03f60410c9ad57c90a327ffb6e8b6b722ec9c995 (patch) | |
tree | df0e61f7c75ba302c95260980cd71a2e40d5303a /test/libsolidity/syntaxTests/specialFunctions | |
parent | 203475ef020d8bf0c0334e51580dc798185b2359 (diff) | |
download | dexon-solidity-03f60410c9ad57c90a327ffb6e8b6b722ec9c995.tar.gz dexon-solidity-03f60410c9ad57c90a327ffb6e8b6b722ec9c995.tar.zst dexon-solidity-03f60410c9ad57c90a327ffb6e8b6b722ec9c995.zip |
Add test for single non-bytes argument.
Diffstat (limited to 'test/libsolidity/syntaxTests/specialFunctions')
-rw-r--r-- | test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol b/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol new file mode 100644 index 00000000..3f8e3014 --- /dev/null +++ b/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol @@ -0,0 +1,12 @@ +contract C { + function f() pure public { + g(keccak256(uint(2))); + g(sha256(uint(2))); + g(ripemd160(uint(2))); + } + function g(bytes32) pure internal {} +} +// ---- +// Warning: (54-72): This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data. The provided argument of type uint256 is not implicitly convertible to expected type bytes memory. +// Warning: (85-100): This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data. The provided argument of type uint256 is not implicitly convertible to expected type bytes memory. +// Warning: (113-131): This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data. The provided argument of type uint256 is not implicitly convertible to expected type bytes memory. |