diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java index f73b75d19e9..7085caf8320 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java @@ -245,6 +245,8 @@ public class ClosureCodegen extends ParentCodegenAware { mv.visitCode(); InstructionAdapter iv = new InstructionAdapter(mv); + ImplementationBodyCodegen.markLineNumberForSyntheticFunction(DescriptorUtils.getParentOfType(funDescriptor, ClassDescriptor.class), iv); + iv.load(0, asmType); ReceiverParameterDescriptor receiver = funDescriptor.getExtensionReceiverParameter(); diff --git a/idea/testData/debugger/tinyApp/outs/syntheticMethods.out b/idea/testData/debugger/tinyApp/outs/syntheticMethods.out index 4db52349115..b8de18f9594 100644 --- a/idea/testData/debugger/tinyApp/outs/syntheticMethods.out +++ b/idea/testData/debugger/tinyApp/outs/syntheticMethods.out @@ -2,10 +2,30 @@ LineBreakpoint created at syntheticMethods.kt:6 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! syntheticMethods.SyntheticMethodsPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' syntheticMethods.kt:6 -syntheticMethods.kt:18 syntheticMethods.kt:19 -syntheticMethods.kt:16 +syntheticMethods.kt:20 +syntheticMethods.kt:17 syntheticMethods.kt:7 +syntheticMethods.kt:0 +syntheticMethods.kt:7 +syntheticMethods.kt:25 +syntheticMethods.kt:31 +syntheticMethods.kt:23 +syntheticMethods.kt:26 +syntheticMethods.kt:23 +syntheticMethods.kt:31 +syntheticMethods.kt:32 +syntheticMethods.kt:28 +syntheticMethods.kt:8 +syntheticMethods.kt:36 +syntheticMethods.kt:42 +syntheticMethods.kt:34 +syntheticMethods.kt:37 +syntheticMethods.kt:34 +syntheticMethods.kt:42 +syntheticMethods.kt:43 +syntheticMethods.kt:39 +syntheticMethods.kt:9 Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' Process finished with exit code 0 diff --git a/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt b/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt index cc5baa86324..ad5fee2cb28 100644 --- a/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt +++ b/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt @@ -4,7 +4,8 @@ fun main(args: Array) { val d: Base = Derived() //Breakpoint! d.foo("") - val a = 1 + A().test() + A.test() } open class Base { @@ -19,4 +20,28 @@ class Derived: Base() { } } -// STEP_INTO: 4 \ No newline at end of file +class A { + fun test() { + lambda { + val a = 1 + } + } + + fun lambda(f: () -> Unit) { + f() + } + + class object { + fun test() { + lambda { + val a = 1 + } + } + + fun lambda(f: () -> Unit) { + f() + } + } +} + +// STEP_INTO: 24 \ No newline at end of file