2019-09-03 16:31:17 +00:00
|
|
|
contract C {
|
|
|
|
function g(bool b) public pure returns (uint, uint) {
|
|
|
|
require(b, "message");
|
|
|
|
return (1, 2);
|
|
|
|
}
|
|
|
|
function f(bool b) public returns (uint x, uint y, bytes memory txt) {
|
|
|
|
try this.g(b) returns (uint a, uint b) {
|
|
|
|
(x, y) = (a, b);
|
|
|
|
} catch (bytes memory s) {
|
|
|
|
txt = s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
2020-02-10 10:58:36 +00:00
|
|
|
// compileViaYul: also
|
2019-09-03 16:31:17 +00:00
|
|
|
// EVMVersion: >=byzantium
|
|
|
|
// ----
|
|
|
|
// f(bool): true -> 1, 2, 96, 0
|
|
|
|
// f(bool): false -> 0, 0, 96, 100, 0x8c379a000000000000000000000000000000000000000000000000000000000, 0x2000000000000000000000000000000000000000000000000000000000, 0x76d657373616765000000000000000000000000000000000000000000, 0
|