aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-11-22 20:33:11 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-12-12 17:39:26 +0800
commit5226d54ed16bb7247c64ac67fec786301a3210ec (patch)
treebed3f42a8f7e8315db852664b2f33495c173c553 /libsolidity/analysis/ReferencesResolver.cpp
parent45d0992ce8dc3b3eb581e76d2c1fb2fbeabe3cfe (diff)
downloaddexon-solidity-5226d54ed16bb7247c64ac67fec786301a3210ec.tar.gz
dexon-solidity-5226d54ed16bb7247c64ac67fec786301a3210ec.tar.zst
dexon-solidity-5226d54ed16bb7247c64ac67fec786301a3210ec.zip
Improve error message for constant evaluator
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index f22c95cc..d8030b97 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -150,7 +150,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
ConstantEvaluator e(*length, m_errorReporter);
auto const* lengthType = dynamic_cast<RationalNumberType const*>(length->annotation().type.get());
if (!lengthType || !lengthType->mobileType())
- fatalTypeError(length->location(), "Invalid array length, expected integer literal.");
+ fatalTypeError(length->location(), "Invalid array length, expected integer literal or constant expression.");
else if (lengthType->isFractional())
fatalTypeError(length->location(), "Array with fractional length specified.");
else if (lengthType->isNegative())