mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
11 lines
320 B
Solidity
11 lines
320 B
Solidity
|
contract C {
|
||
|
function f() external payable returns (uint) { assert(msg.value > 0); return 1; }
|
||
|
function g() external payable returns (uint) { assert(msg.value > 0); return 2; }
|
||
|
|
||
|
function h() public payable returns (uint) {
|
||
|
return [this.f, this.g][0]{value: 1}();
|
||
|
}
|
||
|
}
|
||
|
// ----
|
||
|
// h(), 1 ether -> 1
|