2020-05-25 17:30:42 +00:00
|
|
|
contract C {
|
|
|
|
function(bytes calldata) returns (byte) x;
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor() { x = f; }
|
2020-05-25 17:30:42 +00:00
|
|
|
function f(bytes calldata b) internal pure returns (byte) {
|
|
|
|
return b[2];
|
|
|
|
}
|
|
|
|
function h(bytes calldata b) external returns (byte) {
|
|
|
|
return x(b);
|
|
|
|
}
|
|
|
|
function g() external returns (byte) {
|
|
|
|
bytes memory a = new bytes(34);
|
|
|
|
a[2] = byte(uint8(7));
|
|
|
|
return this.h(a);
|
|
|
|
}
|
|
|
|
}
|
2020-11-02 12:05:07 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-05-25 17:30:42 +00:00
|
|
|
// ----
|
|
|
|
// g() -> 0x0700000000000000000000000000000000000000000000000000000000000000
|