solidity/test/libsolidity/semanticTests/dirty_calldata_bytes.sol
2023-05-11 10:56:55 -05:00

13 lines
261 B
Solidity

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