mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Propagate function call argument types across function call options.
This commit is contained in:
committed by
Alex Beregszaszi
parent
0c7e4cf16b
commit
d4ecd33247
@@ -0,0 +1,14 @@
|
||||
contract C {
|
||||
function f(uint x) external payable returns (uint) { return 1; }
|
||||
function f(uint x, uint y) external payable returns (uint) { return 2; }
|
||||
function call() public payable returns (uint v, uint x, uint y, uint z) {
|
||||
v = this.f{value: 10}(2);
|
||||
x = this.f{gas: 1000}(2, 3);
|
||||
y = this.f{gas: 1000, value: 10}(2, 3);
|
||||
z = this.f{gas: 1000}{value: 10}(2, 3);
|
||||
}
|
||||
receive() external payable {}
|
||||
}
|
||||
// ----
|
||||
// (), 1 ether
|
||||
// call() -> 1, 2, 2, 2
|
||||
Reference in New Issue
Block a user