mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
10 lines
211 B
Solidity
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"
|