Error on invalid arithmetic with constant expressions.

This commit is contained in:
Daniel Kirchner
2018-04-11 21:17:10 +02:00
parent 418e2725b5
commit daa69df447
13 changed files with 115 additions and 20 deletions
@@ -0,0 +1,9 @@
contract c {
uint constant a1 = 0;
uint constant a2 = 1;
uint constant b1 = 3 % a1;
uint constant b2 = 3 % (a2 - 1);
}
// ----
// TypeError: (88-94): Modulo zero.
// TypeError: (119-131): Modulo zero.