aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-04-10 16:20:31 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2019-04-13 20:54:34 +0800
commit690cc9389848e5f97781dbabd3a1f5291bb48304 (patch)
tree1bb2029bbdb2ce5677fe2e7f6f0b9063af80450d /libsolidity
parent1109fd9a6b621320cedd3fac7c25ccb4ced34a6b (diff)
downloaddexon-solidity-develop.tar.gz
dexon-solidity-develop.tar.zst
dexon-solidity-develop.zip
Fix time constantsHEADv0.5.3releasedevelop
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/Types.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 3a8c9878..fed0cb3e 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -938,7 +938,6 @@ tuple<bool, rational> RationalNumberType::isValidLiteral(Literal const& _literal
{
case Literal::SubDenomination::None:
case Literal::SubDenomination::Wei:
- case Literal::SubDenomination::Second:
break;
case Literal::SubDenomination::Szabo:
value *= bigint("1000000000000");
@@ -949,20 +948,23 @@ tuple<bool, rational> RationalNumberType::isValidLiteral(Literal const& _literal
case Literal::SubDenomination::Ether:
value *= bigint("1000000000000000000");
break;
+ case Literal::SubDenomination::Second:
+ value *= bigint("1000");
+ break;
case Literal::SubDenomination::Minute:
- value *= bigint("60");
+ value *= bigint("60000");
break;
case Literal::SubDenomination::Hour:
- value *= bigint("3600");
+ value *= bigint("3600000");
break;
case Literal::SubDenomination::Day:
- value *= bigint("86400");
+ value *= bigint("86400000");
break;
case Literal::SubDenomination::Week:
- value *= bigint("604800");
+ value *= bigint("604800000");
break;
case Literal::SubDenomination::Year:
- value *= bigint("31536000");
+ value *= bigint("31536000000");
break;
}