Debugger, BE: Generate original line number after inlining if call is used in an if condition

If a part of an 'if' condition is an inline function call, we need to insert the original condition line after it. Otherwise, the debugger will think it is inside the inline function implementation. Obviously, this breaks stepping – instead of the 'if' body, we go on stepping through the inline function.

This commit fixes 'KotlinSteppingTestGenerated.StepOver#testSoInlineLibFun' test.
This commit is contained in:
Yan Zhulanow
2019-12-23 18:08:13 +09:00
parent f115bde682
commit cc2fe6b0c6
10 changed files with 76 additions and 12 deletions
@@ -3253,6 +3253,16 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/lineNumbers/ifTrueElse.kt");
}
@TestMetadata("inlineCondition.kt")
public void testInlineCondition() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/lineNumbers/inlineCondition.kt");
}
@TestMetadata("inlineCondition2.kt")
public void testInlineCondition2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/lineNumbers/inlineCondition2.kt");
}
@TestMetadata("singleThen.kt")
public void testSingleThen() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/lineNumbers/singleThen.kt");