aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/tight_packing_literals_fine.sol
blob: 27665b525b48a72815e9aa79e456e3f921797d34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
contract C {
    function f() pure public returns (bytes32) {
        return keccak256(uint8(1));
    }
    function h() pure public returns (bytes32) {
        return sha256(uint8(1));
    }
    function j() pure public returns (bytes32) {
        return ripemd160(uint8(1));
    }
    function k() pure public returns (bytes) {
        return abi.encodePacked(uint8(1));
    }
    function l() pure public returns (bytes) {
        return abi.encode(1);
    }
}
// ----
// Warning: (77-96): This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data.
// Warning: (77-96): The provided argument of type uint8 is not implicitly convertible to expected type bytes memory.
// Warning: (168-184): This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data.
// Warning: (168-184): The provided argument of type uint8 is not implicitly convertible to expected type bytes memory.
// Warning: (256-275): This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data.
// Warning: (256-275): The provided argument of type uint8 is not implicitly convertible to expected type bytes memory.