diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2BreakpointApplicabilityTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2BreakpointApplicabilityTestGenerated.java index fe9813852421..220c41e80bdb 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2BreakpointApplicabilityTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2BreakpointApplicabilityTestGenerated.java @@ -50,6 +50,11 @@ public class K2BreakpointApplicabilityTestGenerated extends AbstractK2Breakpoint runTest("../testData/breakpointApplicability/inlineOnly.kt"); } + @TestMetadata("lambdaProperty.kt") + public void testLambdaProperty() throws Exception { + runTest("../testData/breakpointApplicability/lambdaProperty.kt"); + } + @TestMetadata("locals.kt") public void testLocals() throws Exception { runTest("../testData/breakpointApplicability/locals.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java index 5fa9c18f5826..2f3c5f94ba6e 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java @@ -1303,6 +1303,11 @@ public abstract class K2IdeK1CodeKotlinSteppingTestGenerated extends AbstractK2I runTest("../testData/stepping/custom/breakpointsInOneLineLambdas.kt"); } + @TestMetadata("breakpointsLambdaProperties.kt") + public void testBreakpointsLambdaProperties() throws Exception { + runTest("../testData/stepping/custom/breakpointsLambdaProperties.kt"); + } + @TestMetadata("constantConditions.kt") public void testConstantConditions() throws Exception { runTest("../testData/stepping/custom/constantConditions.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java index 8a084a5af760..ae055cd7abc6 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java @@ -1303,6 +1303,11 @@ public abstract class K2IdeK2CodeKotlinSteppingTestGenerated extends AbstractK2I runTest("../testData/stepping/custom/breakpointsInOneLineLambdas.kt"); } + @TestMetadata("breakpointsLambdaProperties.kt") + public void testBreakpointsLambdaProperties() throws Exception { + runTest("../testData/stepping/custom/breakpointsLambdaProperties.kt"); + } + @TestMetadata("constantConditions.kt") public void testConstantConditions() throws Exception { runTest("../testData/stepping/custom/constantConditions.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java index 5ce344084ef2..9fb6324505c8 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java @@ -1303,6 +1303,11 @@ public abstract class K2IndyLambdaKotlinSteppingTestGenerated extends AbstractK2 runTest("../testData/stepping/custom/breakpointsInOneLineLambdas.kt"); } + @TestMetadata("breakpointsLambdaProperties.kt") + public void testBreakpointsLambdaProperties() throws Exception { + runTest("../testData/stepping/custom/breakpointsLambdaProperties.kt"); + } + @TestMetadata("constantConditions.kt") public void testConstantConditions() throws Exception { runTest("../testData/stepping/custom/constantConditions.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/BreakpointApplicabilityTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/BreakpointApplicabilityTestGenerated.java index c630e242dd21..bf21350e3e0b 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/BreakpointApplicabilityTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/BreakpointApplicabilityTestGenerated.java @@ -50,6 +50,11 @@ public class BreakpointApplicabilityTestGenerated extends AbstractBreakpointAppl runTest("testData/breakpointApplicability/inlineOnly.kt"); } + @TestMetadata("lambdaProperty.kt") + public void testLambdaProperty() throws Exception { + runTest("testData/breakpointApplicability/lambdaProperty.kt"); + } + @TestMetadata("locals.kt") public void testLocals() throws Exception { runTest("testData/breakpointApplicability/locals.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java index 9c0950d5a6f3..62f7fb9b4dbb 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java @@ -1303,6 +1303,11 @@ public abstract class IndyLambdaIrKotlinSteppingTestGenerated extends AbstractIn runTest("testData/stepping/custom/breakpointsInOneLineLambdas.kt"); } + @TestMetadata("breakpointsLambdaProperties.kt") + public void testBreakpointsLambdaProperties() throws Exception { + runTest("testData/stepping/custom/breakpointsLambdaProperties.kt"); + } + @TestMetadata("constantConditions.kt") public void testConstantConditions() throws Exception { runTest("testData/stepping/custom/constantConditions.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java index 30e0c56451ea..bf0b5212ae55 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java @@ -1303,6 +1303,11 @@ public abstract class IrKotlinSteppingTestGenerated extends AbstractIrKotlinStep runTest("testData/stepping/custom/breakpointsInOneLineLambdas.kt"); } + @TestMetadata("breakpointsLambdaProperties.kt") + public void testBreakpointsLambdaProperties() throws Exception { + runTest("testData/stepping/custom/breakpointsLambdaProperties.kt"); + } + @TestMetadata("constantConditions.kt") public void testConstantConditions() throws Exception { runTest("testData/stepping/custom/constantConditions.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java index 3edf5b807f38..a866e7607582 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java @@ -1303,6 +1303,11 @@ public abstract class K1IdeK2CodeKotlinSteppingTestGenerated extends AbstractK1I runTest("testData/stepping/custom/breakpointsInOneLineLambdas.kt"); } + @TestMetadata("breakpointsLambdaProperties.kt") + public void testBreakpointsLambdaProperties() throws Exception { + runTest("testData/stepping/custom/breakpointsLambdaProperties.kt"); + } + @TestMetadata("constantConditions.kt") public void testConstantConditions() throws Exception { runTest("testData/stepping/custom/constantConditions.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/testData/breakpointApplicability/lambdaProperty.kt b/plugins/kotlin/jvm-debugger/test/testData/breakpointApplicability/lambdaProperty.kt new file mode 100644 index 000000000000..46e75a48f5e6 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/breakpointApplicability/lambdaProperty.kt @@ -0,0 +1,5 @@ +val gF1: (Int, Int) -> String = { a, b -> "Both ${a + b}" } /// F, λ + +class A1 { /// M + val mF1: (Int, Int) -> String = { a, b -> "Both ${a + b}" } /// F, λ +} diff --git a/plugins/kotlin/jvm-debugger/test/testData/breakpointApplicability/lambdaProperty.out b/plugins/kotlin/jvm-debugger/test/testData/breakpointApplicability/lambdaProperty.out new file mode 100644 index 000000000000..349705ad307a --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/breakpointApplicability/lambdaProperty.out @@ -0,0 +1,2 @@ +λ 1 Highlight range: '{ a, b -> "Both ${a + b}" }' +λ 4 Highlight range: '{ a, b -> "Both ${a + b}" }' diff --git a/plugins/kotlin/jvm-debugger/test/testData/stepping/custom/breakpointsLambdaProperties.kt b/plugins/kotlin/jvm-debugger/test/testData/stepping/custom/breakpointsLambdaProperties.kt new file mode 100644 index 000000000000..2131e4933ae3 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/stepping/custom/breakpointsLambdaProperties.kt @@ -0,0 +1,23 @@ +package breakpointsLambdaProperties + +//Breakpoint! (lambdaOrdinal = 1) +val gF1: (Int, Int) -> String = { a, b -> "Both ${a + b}" } + +class A1 { + //Breakpoint! (lambdaOrdinal = 1) + val mF1: (Int, Int) -> String = { a, b -> "Both ${a + b}" } +} + +fun f1() { + //Breakpoint! (lambdaOrdinal = 1) + val lF1: (Int, Int) -> String = { a, b -> "Both ${a + b}" } + lF1(1, 2) +} + +fun main() { + gF1(1, 2) + A1().mF1(1, 3) + f1() +} + +// RESUME: 2 diff --git a/plugins/kotlin/jvm-debugger/test/testData/stepping/custom/breakpointsLambdaProperties.out b/plugins/kotlin/jvm-debugger/test/testData/stepping/custom/breakpointsLambdaProperties.out new file mode 100644 index 000000000000..88fb63b64957 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/stepping/custom/breakpointsLambdaProperties.out @@ -0,0 +1,11 @@ +LineBreakpoint created at breakpointsLambdaProperties.kt:4 lambdaOrdinal = 1 +LineBreakpoint created at breakpointsLambdaProperties.kt:8 lambdaOrdinal = 1 +LineBreakpoint created at breakpointsLambdaProperties.kt:13 lambdaOrdinal = 1 +Run Java +Connected to the target VM +breakpointsLambdaProperties.kt:4 +breakpointsLambdaProperties.kt:8 +breakpointsLambdaProperties.kt:13 +Disconnected from the target VM + +Process finished with exit code 0