mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[TypeChecker] Remove function input and return parameter names from mobileType
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
function g(int x, int y) public pure returns (int) { return x - y; }
|
||||
function h(int y, int x) public pure returns (int) { return y - x; }
|
||||
|
||||
function f() public pure returns (int) {
|
||||
return (false ? g : h)(2, 1);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// f() -> 1
|
||||
@@ -0,0 +1,14 @@
|
||||
contract C {
|
||||
function g(int x, int y) public pure returns (int) { return x - y; }
|
||||
function h(int y, int x) public pure returns (int) { return y - x; }
|
||||
|
||||
function f() public pure {
|
||||
(true ? g : h)({x : 1, y : 2});
|
||||
[g, h][1]({x : 1, y : 2});
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4974: (199-229): Named argument "x" does not match function declaration.
|
||||
// TypeError 4974: (199-229): Named argument "y" does not match function declaration.
|
||||
// TypeError 4974: (239-264): Named argument "x" does not match function declaration.
|
||||
// TypeError 4974: (239-264): Named argument "y" does not match function declaration.
|
||||
Reference in New Issue
Block a user