solidity/test/libsolidity/semanticTests/dirty_calldata_bytes.sol

16 lines
316 B
Solidity
Raw Normal View History

contract C {
function f(bytes calldata b) public returns (bool correct) {
2020-12-14 17:34:40 +00:00
bytes1 a = b[3];
uint r;
assembly {
r := a
}
correct = r == (0x64 << 248);
}
}
2020-07-20 13:06:45 +00:00
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
2020-07-20 13:06:45 +00:00
// f(bytes): 0x20, 0x04, "dead" -> true