From 3ea878b1c65349cf020e2e34d6e69ebe705fdb88 Mon Sep 17 00:00:00 2001 From: Jiaxiang Chen Date: Wed, 13 Nov 2019 17:16:53 -0800 Subject: [PATCH] JVM_IR: Fix line number for varible initializer --- .../jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt | 2 +- compiler/testData/debug/stepping/conjunction.kt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt index 6e3d48d4531..1e2ab37463d 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt @@ -443,8 +443,8 @@ class ExpressionCodegen( declaration.initializer?.let { it.accept(this, data).coerce(varType, declaration.type).materialize() - mv.store(index, varType) it.markLineNumber(startOffset = true) + mv.store(index, varType) } data.variables.add(VariableInfo(declaration, index, varType, markNewLabel())) diff --git a/compiler/testData/debug/stepping/conjunction.kt b/compiler/testData/debug/stepping/conjunction.kt index 29ea7974433..76ed1354031 100644 --- a/compiler/testData/debug/stepping/conjunction.kt +++ b/compiler/testData/debug/stepping/conjunction.kt @@ -18,9 +18,6 @@ fun getC() = false fun getD() = true -// IGNORE_BACKEND: JVM_IR -// IR backend is missing a line number 3 in box() after stepping on line 9 for getting the result of false - // LINENUMBERS // TestKt.box():3 // TestKt.getA():13