Keep DebugMetadata annotation when regenerate lambda with state-machine
When a suspend lambda does not capture crossinline lambda, it is generated with as state-machine, since it does not inline anything. However, when regenerating, the inliner used to remove all DebugMetadata annotations to avoid duplication. This lead to missing annotation if the lambda is regenerated, but state-machine is not regenerated. This change fixes the blind spot by readding the annotation after regeneration. #KT-41789 Fixed
This commit is contained in:
+5
@@ -3818,6 +3818,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("debugMetadataCrossinline.kt")
|
||||
public void testDebugMetadataCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedProperties.kt")
|
||||
public void testDelegatedProperties_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
Generated
+5
@@ -3818,6 +3818,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("debugMetadataCrossinline.kt")
|
||||
public void testDebugMetadataCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedProperties.kt")
|
||||
public void testDelegatedProperties_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -3808,6 +3808,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("debugMetadataCrossinline.kt")
|
||||
public void testDebugMetadataCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedProperties.kt")
|
||||
public void testDelegatedProperties_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines");
|
||||
|
||||
Generated
+5
@@ -3808,6 +3808,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("debugMetadataCrossinline.kt")
|
||||
public void testDebugMetadataCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedProperties.kt")
|
||||
public void testDelegatedProperties_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines");
|
||||
|
||||
+5
@@ -3808,6 +3808,11 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("debugMetadataCrossinline.kt")
|
||||
public void testDebugMetadataCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedProperties.kt")
|
||||
public void testDelegatedProperties_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines");
|
||||
|
||||
+5
@@ -3808,6 +3808,11 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("debugMetadataCrossinline.kt")
|
||||
public void testDebugMetadataCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedProperties.kt")
|
||||
public void testDelegatedProperties_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines");
|
||||
|
||||
Reference in New Issue
Block a user