2020-01-28 10:59:44 +00:00
|
|
|
contract test {
|
2020-07-13 20:11:42 +00:00
|
|
|
function fixedBytesHex() public returns(bytes32 ret) {
|
|
|
|
return hex"aabb00ff";
|
|
|
|
}
|
2020-01-28 10:59:44 +00:00
|
|
|
function fixedBytes() public returns(bytes32 ret) {
|
|
|
|
return "abc\x00\xff__";
|
|
|
|
}
|
|
|
|
function pipeThrough(bytes2 small, bool one) public returns(bytes16 large, bool oneRet) {
|
|
|
|
oneRet = one;
|
|
|
|
large = small;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
|
|
|
// ----
|
2020-07-13 20:11:42 +00:00
|
|
|
// fixedBytesHex() -> "\xaa\xbb\0\xff"
|
2020-01-28 10:59:44 +00:00
|
|
|
// fixedBytes() -> "abc\0\xff__"
|
|
|
|
// pipeThrough(bytes2, bool): "\0\x02", true -> "\0\x2", true
|