solidity/test/libsolidity/semanticTests/functionTypes/inline_array_with_value_call_option.sol
2020-07-23 14:55:32 +02:00

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