solidity/test/libsolidity/syntaxTests/array/bytes_to_fixed_bytes.sol

7 lines
223 B
Solidity
Raw Normal View History

contract C {
bytes s;
function f(bytes calldata c, string memory m) public view returns (bytes3, bytes8, bytes16, bytes32) {
return (bytes3(c[0:3]), bytes8(s), bytes16(c), bytes32(bytes(m)));
}
}
// ----