The "year" denomination is deprecated

This commit is contained in:
Alex Beregszaszi
2018-04-23 16:19:51 +01:00
parent 75faed7c55
commit 1ac0090f31
5 changed files with 30 additions and 0 deletions
@@ -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.
@@ -0,0 +1,5 @@
contract C {
uint constant a = 3 years;
}
// ----
// Warning: (32-39): Using "years" as a unit denomination is deprecated.
@@ -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.