Introduce a workaround in interpreter tests to make them pass
There is a problem with ranges and iterators. To work properly they must be resolved firstly, before operator rangeTo.
This commit is contained in:
committed by
TeamCityServer
parent
44e1b61e6c
commit
4f15bd4817
+4
-1
@@ -1,4 +1,7 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// this hack is used to ensure that iterator will be resolved first
|
||||
@CompileTimeCalculation internal class IntProgressionIterator(first: Int, last: Int, val step: Int) : IntIterator()
|
||||
@CompileTimeCalculation public class IntRange(start: Int, endInclusive: Int) : IntProgression(start, endInclusive, 1), ClosedRange<Int>
|
||||
|
||||
@CompileTimeCalculation
|
||||
fun loop(toInc: Int, start: Int, end: Int): Int {
|
||||
var result = toInc
|
||||
|
||||
Reference in New Issue
Block a user