revive-integration 1.3.0

revive compiler integration test cases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

/// Probe: abi.encodePacked tight-packing of mixed-width values + keccak256
/// (signature/CREATE2/mapping-key hashing). Must match EVM exactly.
contract EncodePackedHash {
    function h(uint8 a, uint256 b, address c, uint16 d, bytes memory e) external pure returns (bytes32) {
        return keccak256(abi.encodePacked(a, b, c, d, e));
    }
    function h2(uint256 a, uint256 b) external pure returns (bytes32) {
        return keccak256(abi.encodePacked(a, b));
    }
    function h3(string memory s, uint8 n) external pure returns (bytes32) {
        return keccak256(abi.encodePacked(s, n));
    }
}