Allow fallback function to return data.

This commit is contained in:
chriseth
2020-11-23 14:22:37 +01:00
parent b62de4f16d
commit fda352094f
15 changed files with 128 additions and 21 deletions
@@ -0,0 +1,17 @@
contract A {
uint public x;
fallback (bytes calldata _input) external returns (bytes memory) {
x = _input.length;
return "";
}
function f() public returns (bool, bytes memory) {
(bool success, bytes memory retval) = address(this).call("abc");
return (success, retval);
}
}
// ====
// compileViaYul: also
// EVMVersion: >=byzantium
// ----
// f() -> 0x01, 0x40, 0x00
// x() -> 3