Do not use deprecated operations in ranges and progressions hashCode.

This commit is contained in:
Ilya Gorbunov
2015-07-02 02:38:15 +03:00
parent 2c4db42319
commit e8aff3360a
4 changed files with 8 additions and 8 deletions
@@ -46,7 +46,7 @@ class GenerateProgressions(out: PrintWriter) : BuiltInsSourceGenerator(out) {
val hashCode = when (kind) {
BYTE, CHAR, SHORT -> "=\n" +
" if (isEmpty()) -1 else (31 * (31 * start.toInt() + end) + increment)"
" if (isEmpty()) -1 else (31 * (31 * start.toInt() + end.toInt()) + increment)"
INT -> "=\n" +
" if (isEmpty()) -1 else (31 * (31 * start + end) + increment)"
LONG -> "=\n" +
@@ -46,7 +46,7 @@ class GenerateRanges(out: PrintWriter) : BuiltInsSourceGenerator(out) {
val hashCode = when (kind) {
BYTE, CHAR, SHORT -> "=\n" +
" if (isEmpty()) -1 else (31 * start.toInt() + end)"
" if (isEmpty()) -1 else (31 * start.toInt() + end.toInt())"
INT -> "=\n" +
" if (isEmpty()) -1 else (31 * start + end)"
LONG -> "=\n" +