solidity/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_greater_size.sol

10 lines
211 B
Solidity
Raw Normal View History

2019-07-10 15:23:19 +00:00
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"