solidity/test/libsolidity/semanticTests/tryCatch/return_function.sol
2019-09-23 17:22:56 +02:00

18 lines
537 B
Solidity

contract C {
function g() public returns (uint a, function() external h, uint b) {
a = 1;
h = this.fun;
b = 9;
}
function f() public returns (uint, function() external, uint) {
// Note that the function type uses two stack slots.
try this.g() returns (uint a, function() external h, uint b) {
return (a, h, b);
} catch {
}
}
function fun() public pure {}
}
// ----
// f() -> 0x1, 0xfdd67305928fcac8d213d1e47bfa6165cd0b87b946644cd0000000000000000, 9