diff --git a/js/js.translator/testData/kotlin_lib.js b/js/js.translator/testData/kotlin_lib.js index 0c4b543e5d1..a5c9c72c97b 100644 --- a/js/js.translator/testData/kotlin_lib.js +++ b/js/js.translator/testData/kotlin_lib.js @@ -481,7 +481,10 @@ return value; }, hasNext: function () { - return this.i <= this.end; + if (this.increment > 0) + return this.i <= this.end; + else + return this.i >= this.end; } }); @@ -495,11 +498,11 @@ return this.start <= number && number <= this.end; }, iterator: function () { - return new Kotlin.RangeIterator(this.start, this.end); + return new Kotlin.RangeIterator(this.start, this.end, this.increment); } }); - Kotlin.Progression = Kotlin.createClassNow(null, + Kotlin.NumberProgression = Kotlin.createClassNow(null, function (start, end, increment) { this.start = start; this.end = end;