solidity/test/libsolidity/syntaxTests/parsing/two_exact_functions.sol

10 lines
404 B
Solidity
Raw Normal View History

2018-05-17 07:04:39 +00:00
// with support of overloaded functions, during parsing,
// we can't determine whether they match exactly, however
// it will throw DeclarationError in following stage.
contract test {
function fun(uint a) public returns(uint r) { return a; }
function fun(uint a) public returns(uint r) { return a; }
2018-05-17 07:04:39 +00:00
}
// ----
// DeclarationError: (189-246): Function with same name and arguments defined twice.