Fix range-based 'for' loop with 'continue' in range bounds
1. Search for increment function in range element type, not in inferred induction variable type (which can be inappropriate, e.g., 'Nothing' in case of 'continue'). 2. Handle nested loops with shared exit labels (generated by JVM_IR for KT-37370 case). KT-37370 KT-37373
This commit is contained in:
+10
@@ -20467,6 +20467,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37370.kt")
|
||||
public void testKt37370() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/kt37370.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37370a.kt")
|
||||
public void testKt37370a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/kt37370a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multiAssignmentIterationOverIntRange.kt")
|
||||
public void testMultiAssignmentIterationOverIntRange() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt");
|
||||
|
||||
Reference in New Issue
Block a user