Spill stack before analyzing it when looking for non-inline suspend lambda
parameters of inline function. Otherwise, it leads to AnalyzerException, when inlined lambda contains try-catch block. The reason is simple: in try block, we leave some variables on stack, while on catch block the stack is empty. Spilling the variables before try block does the trick. #KT-34708 Fixed
This commit is contained in:
+10
@@ -3813,6 +3813,16 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("tryCatchReceiver.kt")
|
||||
public void testTryCatchReceiver_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("tryCatchReceiver.kt")
|
||||
public void testTryCatchReceiver_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("tryCatchStackTransform.kt")
|
||||
public void testTryCatchStackTransform_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
Reference in New Issue
Block a user