solidity/test/libsolidity/syntaxTests/constants/mod_zero.sol
2018-04-11 21:17:10 +02:00

10 lines
217 B
Solidity

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.