aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AST.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/AST.cpp b/AST.cpp
index 2fd60f7b..9d19b30c 100644
--- a/AST.cpp
+++ b/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);
}