mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
add the location of a duplicated function
This commit is contained in:
parent
4033615464
commit
5dcee599f1
3
AST.cpp
3
AST.cpp
@ -82,7 +82,8 @@ void ContractDefinition::checkTypeRequirements()
|
||||
{
|
||||
string signature = function->getCanonicalSignature();
|
||||
if (functions.count(signature))
|
||||
BOOST_THROW_EXCEPTION(DeclarationError() << errinfo_comment("Duplicate functions are not allowed."));
|
||||
BOOST_THROW_EXCEPTION(DeclarationError() << errinfo_sourceLocation(function->getLocation())
|
||||
<< errinfo_comment("Duplicate functions are not allowed."));
|
||||
functions.insert(signature);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user