aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol
blob: f931d6cfc30a6d84621ab17714ad2830408f52b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
contract C {
    function f() pure public {
        g(keccak256(uint(2)));
        g(sha256(uint(2)));
        g(ripemd160(uint(2)));
    }
    function g(bytes32) pure internal {}
}
// ----
// TypeError: (64-71): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.
// TypeError: (92-99): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.
// TypeError: (123-130): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.