Enforce error on hex number combined with unit denomination

This commit is contained in:
Leonardo Alt
2018-07-09 17:19:41 +02:00
parent 694754b4fe
commit c1b67a845b
4 changed files with 8 additions and 24 deletions
@@ -2,4 +2,4 @@ contract C {
uint constant x = 0x01 wei;
}
// ----
// Warning: (32-40): Hexadecimal numbers with unit denominations are deprecated. You can use an expression of the form "0x1234 * 1 day" instead.
// TypeError: (32-40): Hexadecimal numbers cannot be used with unit denominations. You can use an expression of the form "0x1234 * 1 day" instead.
@@ -1,6 +0,0 @@
pragma experimental "v0.5.0";
contract C {
uint constant x = 0x01 wei;
}
// ----
// TypeError: (62-70): Hexadecimal numbers cannot be used with unit denominations. You can use an expression of the form "0x1234 * 1 day" instead.