diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-23 21:54:45 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-23 23:19:51 +0800 |
commit | 1ac0090f31d12a720950991ab4e85710877effd1 (patch) | |
tree | 4c084c0f90d9d3b5551fdaeeaa0599d0147acb01 /test | |
parent | 75faed7c55a45770b6b56fa9fe2be308604030a0 (diff) | |
download | dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.tar dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.tar.gz dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.tar.bz2 dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.tar.lz dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.tar.xz dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.tar.zst dexon-solidity-1ac0090f31d12a720950991ab4e85710877effd1.zip |
The "year" denomination is deprecated
Diffstat (limited to 'test')
3 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/denominations/denominations.sol b/test/libsolidity/syntaxTests/denominations/denominations.sol index de9f73e1..6d1aa2f3 100644 --- a/test/libsolidity/syntaxTests/denominations/denominations.sol +++ b/test/libsolidity/syntaxTests/denominations/denominations.sol @@ -3,3 +3,5 @@ contract C { uint constant b = 1 seconds + 2 minutes + 3 hours + 4 days + 5 weeks + 6 years; 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 new file mode 100644 index 00000000..30e86535 --- /dev/null +++ b/test/libsolidity/syntaxTests/denominations/deprecated_year.sol @@ -0,0 +1,5 @@ +contract C { + uint constant a = 3 years; +} +// ---- +// Warning: (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 new file mode 100644 index 00000000..4baaeaa3 --- /dev/null +++ b/test/libsolidity/syntaxTests/denominations/deprecated_year_050.sol @@ -0,0 +1,6 @@ +pragma experimental "v0.5.0"; +contract C { + uint constant a = 3 years; +} +// ---- +// TypeError: (62-69): Using "years" as a unit denomination is deprecated. |