solidity/test/libsolidity/syntaxTests/functionCalls/named_arguments_invalid_name.sol
Kamil Śliwak 4045f41c8d Make the test for invalid named arguments more robust
- Add more parameters and use different types.
- Now it's clear that the name used in the error message is wrong.
2020-09-17 17:29:28 +02:00

14 lines
392 B
Solidity

contract test {
function f(uint a, bool b, bytes memory c, uint d, bool e) public returns (uint r) {
if (b && !e)
r = a + d;
else
r = c.length;
}
function g() public returns (uint r) {
r = f({c: "abc", x: 1, e: 2, a: 11, b: 12});
}
}
// ----
// TypeError 4974: (249-288): Named argument "a" does not match function declaration.