Do not store nulls for captured variables going out of scope
These values can't be read after going out of scope. JVM implementation can take care of such object references on its own. Ref objects for captured variables are not different from any other objects stored in local variables, so there's really no reason to nullify these references explicitly. #KT-18478 Fixed Target versions 1.1.4
This commit is contained in:
@@ -132,6 +132,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("doNotStoreNullsForCapturedVars.kt")
|
||||
public void testDoNotStoreNullsForCapturedVars() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/doNotStoreNullsForCapturedVars.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("falseSmartCast.kt")
|
||||
public void testFalseSmartCast() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/falseSmartCast.kt");
|
||||
|
||||
Reference in New Issue
Block a user