mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Error on invalid arithmetic with constant expressions.
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user