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

10 lines
201 B
Solidity

contract Test {
function bytesToUint(bytes4 s) public returns (uint16 h) {
return uint16(uint32(s));
}
}
// ====
// compileViaYul: also
// ----
// bytesToUint(bytes4): "abcd" -> 0x6364