Add new tests for step progressions and fix existing tests.
This commit is contained in:
committed by
max-kammerer
parent
27642514b1
commit
277cb39e3b
@@ -0,0 +1,20 @@
|
||||
fun foo() {
|
||||
for (i in 1..2 step 4) {}
|
||||
}
|
||||
|
||||
// JVM non-IR does NOT specifically handle "step" progressions. The stepped progression in the above code are constructed and its
|
||||
// first/last/step properties are retrieved.
|
||||
// JVM IR has an optimized handler for "step" progressions and elides the construction of the stepped progressions.
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// 1 INVOKEVIRTUAL kotlin/ranges/IntProgression.getFirst \(\)I
|
||||
// 1 getFirst
|
||||
// 1 INVOKEVIRTUAL kotlin/ranges/IntProgression.getLast \(\)I
|
||||
// 1 getLast
|
||||
// 1 INVOKEVIRTUAL kotlin/ranges/IntProgression.getStep \(\)I
|
||||
// 1 getStep
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 getFirst
|
||||
// 0 getLast
|
||||
// 0 getStep
|
||||
Reference in New Issue
Block a user