aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@gmail.com>2015-03-08 22:42:29 +0800
committerLu Guanqun <guanqun.lu@gmail.com>2015-03-08 22:50:54 +0800
commit5dcee599f1f0d65fb4564426312732ce7e56ba29 (patch)
tree6923626110bfcb1c43af31142379c4e1e41134dd /AST.cpp
parent40336154641da903f5721c3f2a3d136971236ed3 (diff)
downloaddexon-solidity-5dcee599f1f0d65fb4564426312732ce7e56ba29.tar.gz
dexon-solidity-5dcee599f1f0d65fb4564426312732ce7e56ba29.tar.zst
dexon-solidity-5dcee599f1f0d65fb4564426312732ce7e56ba29.zip
add the location of a duplicated function
Diffstat (limited to 'AST.cpp')
-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);
}