Recapture shared variables when calling local class constructor
When a local function or class A creates an instance of a local class B capturing an outer variable 'x', it should use ref for 'x', but not the value of 'x'.
This commit is contained in:
@@ -11318,6 +11318,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("recaptureVarCapturedInLocalClass1.kt")
|
||||
public void testRecaptureVarCapturedInLocalClass1() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("recaptureVarCapturedInLocalClass2.kt")
|
||||
public void testRecaptureVarCapturedInLocalClass2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("recaptureVarCapturedInLocalClass3.kt")
|
||||
public void testRecaptureVarCapturedInLocalClass3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("withclosure.kt")
|
||||
public void testWithclosure() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt");
|
||||
|
||||
Reference in New Issue
Block a user