Error message tweak: built-in unary/binary operator

This commit is contained in:
wechman
2022-11-07 17:13:41 +01:00
committed by Kamil Śliwak
parent 4c9a58eb0f
commit 6da09e8d9a
63 changed files with 172 additions and 172 deletions
@@ -2,4 +2,4 @@ contract C {
uint constant a = 1 / 0;
}
// ----
// TypeError 2271: (35-40): Operator / not compatible with types int_const 1 and int_const 0.
// TypeError 2271: (35-40): Built-in binary operator / cannot be applied to types int_const 1 and int_const 0.
@@ -2,4 +2,4 @@ contract C {
uint constant a = 1 / ((1+3)-4);
}
// ----
// TypeError 2271: (35-48): Operator / not compatible with types int_const 1 and int_const 0.
// TypeError 2271: (35-48): Built-in binary operator / cannot be applied to types int_const 1 and int_const 0.
@@ -6,5 +6,5 @@ contract C {
}
}
// ----
// TypeError 2271: (67-78): Operator ** not compatible with types int256 and int_const 1000...(1226 digits omitted)...0000. Exponent too large.
// TypeError 2271: (88-98): Operator ** not compatible with types int256 and rational_const 1 / 2. Exponent is fractional.
// TypeError 2271: (67-78): Built-in binary operator ** cannot be applied to types int256 and int_const 1000...(1226 digits omitted)...0000. Exponent too large.
// TypeError 2271: (88-98): Built-in binary operator ** cannot be applied to types int256 and rational_const 1 / 2. Exponent is fractional.
@@ -2,4 +2,4 @@ contract C {
uint constant b3 = 1 % 0;
}
// ----
// TypeError 2271: (36-41): Operator % not compatible with types int_const 1 and int_const 0.
// TypeError 2271: (36-41): Built-in binary operator % cannot be applied to types int_const 1 and int_const 0.
@@ -2,4 +2,4 @@ contract C {
uint constant b3 = 1 % (-4+((2)*2));
}
// ----
// TypeError 2271: (36-52): Operator % not compatible with types int_const 1 and int_const 0.
// TypeError 2271: (36-52): Built-in binary operator % cannot be applied to types int_const 1 and int_const 0.