aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorVoR0220 <catalanor0220@gmail.com>2016-03-30 04:56:26 +0800
committerVoR0220 <catalanor0220@gmail.com>2016-05-10 00:41:03 +0800
commitf67bfd24a3c294f0388f847be213a5236ffd60a4 (patch)
tree3eff0a5497d2b9d9a1d4a1766b3b4dd81aa3d085 /libsolidity/analysis
parent4b749fc33335cee2de50e31776ddae1f73649a7b (diff)
downloaddexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.tar
dexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.tar.gz
dexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.tar.bz2
dexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.tar.lz
dexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.tar.xz
dexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.tar.zst
dexon-solidity-f67bfd24a3c294f0388f847be213a5236ffd60a4.zip
rational renaming
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/ConstantEvaluator.cpp6
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/analysis/ConstantEvaluator.cpp b/libsolidity/analysis/ConstantEvaluator.cpp
index a86e3967..bdd8f61e 100644
--- a/libsolidity/analysis/ConstantEvaluator.cpp
+++ b/libsolidity/analysis/ConstantEvaluator.cpp
@@ -31,7 +31,7 @@ using namespace dev::solidity;
void ConstantEvaluator::endVisit(UnaryOperation const& _operation)
{
TypePointer const& subType = _operation.subExpression().annotation().type;
- if (!dynamic_cast<ConstantNumberType const*>(subType.get()))
+ if (!dynamic_cast<RationalNumberType const*>(subType.get()))
BOOST_THROW_EXCEPTION(_operation.subExpression().createTypeError("Invalid constant expression."));
TypePointer t = subType->unaryOperatorResult(_operation.getOperator());
_operation.annotation().type = t;
@@ -41,9 +41,9 @@ void ConstantEvaluator::endVisit(BinaryOperation const& _operation)
{
TypePointer const& leftType = _operation.leftExpression().annotation().type;
TypePointer const& rightType = _operation.rightExpression().annotation().type;
- if (!dynamic_cast<ConstantNumberType const*>(leftType.get()))
+ if (!dynamic_cast<RationalNumberType const*>(leftType.get()))
BOOST_THROW_EXCEPTION(_operation.leftExpression().createTypeError("Invalid constant expression."));
- if (!dynamic_cast<ConstantNumberType const*>(rightType.get()))
+ if (!dynamic_cast<RationalNumberType const*>(rightType.get()))
BOOST_THROW_EXCEPTION(_operation.rightExpression().createTypeError("Invalid constant expression."));
TypePointer commonType = leftType->binaryOperatorResult(_operation.getOperator(), rightType);
if (Token::isCompareOp(_operation.getOperator()))
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index 3351c716..f4e0f838 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -103,7 +103,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
{
if (!length->annotation().type)
ConstantEvaluator e(*length);
- auto const* lengthType = dynamic_cast<ConstantNumberType const*>(length->annotation().type.get());
+ auto const* lengthType = dynamic_cast<RationalNumberType const*>(length->annotation().type.get());
if (!lengthType)
fatalTypeError(length->location(), "Invalid array length.");
else if (lengthType->denominator() != 1)