solidity/test/libsolidity/semanticTests/dirty_calldata_bytes.sol
2020-07-20 15:40:58 +02:00

15 lines
290 B
Solidity

contract C {
function f(bytes calldata b) public returns (bool correct) {
byte a = b[3];
uint r;
assembly {
r := a
}
correct = r == (0x64 << 248);
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x04, "dead" -> true