diff --git a/idea/idea-completion/testData/handlers/basic/ReceiverParam.kt b/idea/idea-completion/testData/handlers/basic/ReceiverParam.kt new file mode 100644 index 00000000000..32604bdc38d --- /dev/null +++ b/idea/idea-completion/testData/handlers/basic/ReceiverParam.kt @@ -0,0 +1,10 @@ +package foo + +fun bar(block: () -> R): R = TODO() +fun T.bar(block: T.() -> R): R = TODO() + +class X { + val b = ba +} + +// TAIL_TEXT: " {...} (block: X.() -> R) for T in foo" \ No newline at end of file diff --git a/idea/idea-completion/testData/handlers/basic/ReceiverParam.kt.after b/idea/idea-completion/testData/handlers/basic/ReceiverParam.kt.after new file mode 100644 index 00000000000..a91affcda47 --- /dev/null +++ b/idea/idea-completion/testData/handlers/basic/ReceiverParam.kt.after @@ -0,0 +1,10 @@ +package foo + +fun bar(block: () -> R): R = TODO() +fun T.bar(block: T.() -> R): R = TODO() + +class X { + val b = bar { } +} + +// TAIL_TEXT: " {...} (block: X.() -> R) for T in foo" \ No newline at end of file diff --git a/idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt b/idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt new file mode 100644 index 00000000000..4ef14bbaadd --- /dev/null +++ b/idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt @@ -0,0 +1,10 @@ +package foo + +fun bar(block: () -> R): R = TODO() +fun T.bar(block: T.() -> R): R = TODO() + +class X { + val b = ba +} + +// TAIL_TEXT: " {...} (block: () -> R) (foo)" \ No newline at end of file diff --git a/idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt.after b/idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt.after new file mode 100644 index 00000000000..7532d36c731 --- /dev/null +++ b/idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt.after @@ -0,0 +1,10 @@ +package foo + +fun bar(block: () -> R): R = TODO() +fun T.bar(block: T.() -> R): R = TODO() + +class X { + val b = foo.bar { } +} + +// TAIL_TEXT: " {...} (block: () -> R) (foo)" \ No newline at end of file diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java index 40d27792f31..129f6e42855 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java @@ -164,6 +164,16 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion runTest("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt"); } + @TestMetadata("ReceiverParam.kt") + public void testReceiverParam() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReceiverParam.kt"); + } + + @TestMetadata("ReceiverParam2.kt") + public void testReceiverParam2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt"); + } + @TestMetadata("ReplaceFunctionCallByProperty.kt") public void testReplaceFunctionCallByProperty() throws Exception { runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt"); diff --git a/idea/performanceTests/org/jetbrains/kotlin/idea/perf/PerformanceBasicCompletionHandlerTestGenerated.java b/idea/performanceTests/org/jetbrains/kotlin/idea/perf/PerformanceBasicCompletionHandlerTestGenerated.java index 4e396647cac..55ba5f22ec8 100644 --- a/idea/performanceTests/org/jetbrains/kotlin/idea/perf/PerformanceBasicCompletionHandlerTestGenerated.java +++ b/idea/performanceTests/org/jetbrains/kotlin/idea/perf/PerformanceBasicCompletionHandlerTestGenerated.java @@ -164,6 +164,16 @@ public class PerformanceBasicCompletionHandlerTestGenerated extends AbstractPerf runTest("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt"); } + @TestMetadata("ReceiverParam.kt") + public void testReceiverParam() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReceiverParam.kt"); + } + + @TestMetadata("ReceiverParam2.kt") + public void testReceiverParam2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt"); + } + @TestMetadata("ReplaceFunctionCallByProperty.kt") public void testReplaceFunctionCallByProperty() throws Exception { runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt");