Check that qualified const expressions are recognized properly in 'for'
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
object Host {
|
||||||
|
const val M = 1
|
||||||
|
const val N = 4
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(): Int {
|
||||||
|
var s = 0
|
||||||
|
for (i in Host.M .. Host.N) {
|
||||||
|
s += i
|
||||||
|
}
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0 IF_ICMPEQ
|
||||||
|
// 1 IF_ICMPGT
|
||||||
@@ -1307,6 +1307,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInRangeToQualifiedConst.kt")
|
||||||
|
public void testForInRangeToQualifiedConst() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToQualifiedConst.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInRangeWithImplicitReceiver.kt")
|
@TestMetadata("forInRangeWithImplicitReceiver.kt")
|
||||||
public void testForInRangeWithImplicitReceiver() throws Exception {
|
public void testForInRangeWithImplicitReceiver() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeWithImplicitReceiver.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeWithImplicitReceiver.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user