diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt index b4cae0aa581..2a8ae6d84a9 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt @@ -179,6 +179,8 @@ private fun JsIrBackendContext.buildInitDeclaration(constructor: IrConstructor, val functionName = "${constructorName}_\$Init\$" return irFactory.buildFun { + startOffset = constructor.startOffset + endOffset = constructor.endOffset name = Name.identifier(functionName) returnType = type visibility = DescriptorVisibilities.INTERNAL @@ -201,6 +203,8 @@ private fun JsIrBackendContext.buildFactoryDeclaration(constructor: IrConstructo val functionName = "${constructorName}_\$Create\$" return irFactory.buildFun { + startOffset = constructor.startOffset + endOffset = constructor.endOffset name = Name.identifier(functionName) returnType = type visibility = constructor.visibility diff --git a/compiler/testData/debug/stepping/constructors.kt b/compiler/testData/debug/stepping/constructors.kt index f7ffb34a8b3..b0fa4ac4f05 100644 --- a/compiler/testData/debug/stepping/constructors.kt +++ b/compiler/testData/debug/stepping/constructors.kt @@ -219,12 +219,12 @@ class O(i: T) { // test.kt:49 L_init_$Init$ // test.kt:13 box // test.kt:57 M_init_$Init$ -// test.kt:61 M_init_$Init$_0 +// test.kt:61 M_init_$Init$ // test.kt:56 M // test.kt:58 M_init_$Init$ // test.kt:14 box // test.kt:65 N_init_$Init$ -// test.kt:69 N_init_$Init$_0 +// test.kt:69 N_init_$Init$ // test.kt:64 N // test.kt:66 N_init_$Init$ // test.kt:15 box @@ -232,4 +232,4 @@ class O(i: T) { // test.kt:16 box // test.kt:73 O_init_$Init$ // test.kt:72 -// test.kt:17 box \ No newline at end of file +// test.kt:17 box diff --git a/js/js.translator/testData/lineNumbers/syntheticCodeInConstructors.kt b/js/js.translator/testData/lineNumbers/syntheticCodeInConstructors.kt index be73c86e334..cae9320f58d 100644 --- a/js/js.translator/testData/lineNumbers/syntheticCodeInConstructors.kt +++ b/js/js.translator/testData/lineNumbers/syntheticCodeInConstructors.kt @@ -25,5 +25,5 @@ class C : A { ) } -// LINES(JS): 1 1 3 * 1 1 1 1 1 1 7 * 9 10 11 * 15 15 16 17 14 19 15 15 22 22 23 24 22 22 -// LINES(JS_IR): 1 1 * 3 * 7 7 9 9 10 11 16 17 15 19 * 23 24 23 * 14 +// LINES(JS): 1 1 3 * 1 1 1 1 1 1 7 * 9 10 11 * 15 15 16 17 14 19 15 15 22 22 23 24 22 22 +// LINES(JS_IR): 1 1 * 3 * 7 7 9 9 10 11 15 16 17 15 19 * 15 * 22 23 24 23 * 22 * 14