Do not use deprecated operations in ranges and progressions hashCode.
This commit is contained in:
@@ -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" +
|
||||
|
||||
Reference in New Issue
Block a user