diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-21 06:01:40 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-22 02:21:02 +0800 |
commit | 72e87423db8d938a4ef5eea92a56332c607accdb (patch) | |
tree | b35087edce7175dede56de0df7a8b457b020c0e3 /test/libsolidity/syntaxTests/denominations | |
parent | 32f2db780c6d4d5ca507c595c8f15cacb51972c7 (diff) | |
download | dexon-solidity-72e87423db8d938a4ef5eea92a56332c607accdb.tar.gz dexon-solidity-72e87423db8d938a4ef5eea92a56332c607accdb.tar.zst dexon-solidity-72e87423db8d938a4ef5eea92a56332c607accdb.zip |
Disallow the years unit denomination properly
Diffstat (limited to 'test/libsolidity/syntaxTests/denominations')
3 files changed, 2 insertions, 9 deletions
diff --git a/test/libsolidity/syntaxTests/denominations/denominations.sol b/test/libsolidity/syntaxTests/denominations/denominations.sol index 6d1aa2f3..43049a14 100644 --- a/test/libsolidity/syntaxTests/denominations/denominations.sol +++ b/test/libsolidity/syntaxTests/denominations/denominations.sol @@ -1,7 +1,6 @@ contract C { uint constant a = 1 wei + 2 szabo + 3 finney + 4 ether; - uint constant b = 1 seconds + 2 minutes + 3 hours + 4 days + 5 weeks + 6 years; + uint constant b = 1 seconds + 2 minutes + 3 hours + 4 days + 5 weeks; uint constant c = 2 szabo / 1 seconds + 3 finney * 3 hours; } // ---- -// Warning: (142-149): Using "years" as a unit denomination is deprecated. diff --git a/test/libsolidity/syntaxTests/denominations/deprecated_year.sol b/test/libsolidity/syntaxTests/denominations/deprecated_year.sol index 30e86535..691c0cb0 100644 --- a/test/libsolidity/syntaxTests/denominations/deprecated_year.sol +++ b/test/libsolidity/syntaxTests/denominations/deprecated_year.sol @@ -2,4 +2,4 @@ contract C { uint constant a = 3 years; } // ---- -// Warning: (32-39): Using "years" as a unit denomination is deprecated. +// TypeError: (32-39): Using "years" as a unit denomination is deprecated. diff --git a/test/libsolidity/syntaxTests/denominations/deprecated_year_050.sol b/test/libsolidity/syntaxTests/denominations/deprecated_year_050.sol deleted file mode 100644 index 4baaeaa3..00000000 --- a/test/libsolidity/syntaxTests/denominations/deprecated_year_050.sol +++ /dev/null @@ -1,6 +0,0 @@ -pragma experimental "v0.5.0"; -contract C { - uint constant a = 3 years; -} -// ---- -// TypeError: (62-69): Using "years" as a unit denomination is deprecated. |