solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/102_duplicate_parameter_names_in_named_args.sol
Kristofer Peterson f927da9182 Refactor of bool TypeChecker::visit(FunctionCall const& _functionCall).
Visit method now cleanly determines if node represents a function call,
struct construction or type conversion. Type checking, validation and
error message logic is moved to separate methods.
2018-11-09 16:35:54 +00:00

12 lines
312 B
Solidity

contract test {
function a(uint a, uint b) public returns (uint r) {
r = a + b;
}
function b() public returns (uint r) {
r = a({a: 1, a: 2});
}
}
// ----
// Warning: (31-37): This declaration shadows an existing declaration.
// TypeError: (159-160): Duplicate named argument "a".