Fix processing of uninitialized instances for coroutines
The problem is that code in the attached test led to VerifyError at runtime because the Bar's uninitialized instance created in 'map' was being stored to the field (leaked from the JVM point of view). The actual problem was that after repeating visiting of NEW operation we used to drop the set of already visited copy usages. For clarification see the comment before 'processUninitializedStores' #KT-15016 Fixed
This commit is contained in:
@@ -4703,6 +4703,12 @@ public class LightAnalysisModeCodegenTestGenerated extends AbstractLightAnalysis
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt15016.kt")
|
||||
public void testKt15016() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15016.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt");
|
||||
|
||||
Reference in New Issue
Block a user