diff --git a/compiler/testData/codegen/bytecodeText/intRangeNoBoxing.kt b/compiler/testData/codegen/bytecodeText/intRangeNoBoxing.kt new file mode 100644 index 00000000000..0e0811d4f85 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/intRangeNoBoxing.kt @@ -0,0 +1,17 @@ +fun Int.until(other: Int) = this..other - 1 +fun foo() { + for (i in 1 until 2) { + } + + for (i in 1..2 step 4) {} +} + +// 1 INVOKEVIRTUAL kotlin/ranges/IntRange.getFirst \(\)I +// 0 INVOKEVIRTUAL kotlin/ranges/IntRange.getFirst \(\)Ljava/lang/Integer; +// 1 INVOKEVIRTUAL kotlin/ranges/IntRange.getLast \(\)I +// 0 INVOKEVIRTUAL kotlin/ranges/IntRange.getLast \(\)Ljava/lang/Integer; + +// 1 INVOKEVIRTUAL kotlin/ranges/IntProgression.getFirst \(\)I +// 0 INVOKEVIRTUAL kotlin/ranges/IntProgression.getFirst \(\)Ljava/lang/Integer; +// 1 INVOKEVIRTUAL kotlin/ranges/IntProgression.getLast \(\)I +// 0 INVOKEVIRTUAL kotlin/ranges/IntProgression.getLast \(\)Ljava/lang/Integer; \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index c76def7f920..b22abdcbd7b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -137,6 +137,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { doTest(fileName); } + @TestMetadata("intRangeNoBoxing.kt") + public void testIntRangeNoBoxing() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intRangeNoBoxing.kt"); + doTest(fileName); + } + @TestMetadata("interfaceDefaultImpl.kt") public void testInterfaceDefaultImpl() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/interfaceDefaultImpl.kt");