aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-10 20:30:24 +0800
committerchriseth <c@ethdev.com>2016-05-11 01:40:37 +0800
commit656405240e08e47fce40a2f62af93abc758bd2d2 (patch)
treead1139d8209d5f98b41dee7eb82ebbd2d7d78495 /libsolidity/analysis/ReferencesResolver.cpp
parentcf226f0607386d1e6d9c75ebc7ce24e733ca4315 (diff)
downloaddexon-solidity-656405240e08e47fce40a2f62af93abc758bd2d2.tar.gz
dexon-solidity-656405240e08e47fce40a2f62af93abc758bd2d2.tar.zst
dexon-solidity-656405240e08e47fce40a2f62af93abc758bd2d2.zip
Simplify interface of RationalNumber.
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 9f83971b..a7b9e8b8 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -104,7 +104,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
if (!length->annotation().type)
ConstantEvaluator e(*length);
auto const* lengthType = dynamic_cast<RationalNumberType const*>(length->annotation().type.get());
- if (!lengthType || lengthType->denominator() != 1)
+ if (!lengthType || lengthType->isFractional())
fatalTypeError(length->location(), "Invalid array length, expected integer literal.");
else
_typeName.annotation().type = make_shared<ArrayType>(DataLocation::Storage, baseType, lengthType->literalValue(nullptr));