Do not box function argument if it is used in EXACTLY_ONCE lambda

Since we cannot change type of parameter, we cannot replace it with
box type.
 #KT-29510 Fixed
 #KT-29614 Fixed
 #KT-29385 Fixed
This commit is contained in:
Ilmir Usmanov
2019-09-25 22:55:48 +03:00
parent c5ba19451f
commit 08794d17a0
15 changed files with 254 additions and 16 deletions
@@ -1084,6 +1084,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt");
}
@TestMetadata("crossinlineCallableReference.kt")
public void testCrossinlineCallableReference() throws Exception {
runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt");
}
@TestMetadata("definiteLongValInitialization.kt")
public void testDefiniteLongValInitialization() throws Exception {
runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt");
@@ -1109,6 +1114,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt");
}
@TestMetadata("exactlyOnceCrossinline2.kt")
public void testExactlyOnceCrossinline2() throws Exception {
runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt");
}
@TestMetadata("exactlyOnceNoinline.kt")
public void testExactlyOnceNoinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt");