solidity/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_greater_size.sol
2019-07-22 16:31:46 +02:00

10 lines
211 B
Solidity

contract Test {
function UintToBytes(uint16 h) public returns (bytes8 s) {
return bytes8(uint64(h));
}
}
// ====
// compileViaYul: also
// ----
// UintToBytes(uint16): 0x6162 -> "\0\0\0\0\0\0ab"