diff options
author | chriseth <c@ethdev.com> | 2016-05-10 20:30:24 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-05-11 01:40:37 +0800 |
commit | 656405240e08e47fce40a2f62af93abc758bd2d2 (patch) | |
tree | ad1139d8209d5f98b41dee7eb82ebbd2d7d78495 /libsolidity/analysis/ReferencesResolver.cpp | |
parent | cf226f0607386d1e6d9c75ebc7ce24e733ca4315 (diff) | |
download | dexon-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.cpp | 2 |
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)); |