Completion: add tests for case with overloaded function with lambda with receiver parameter
Relates to #KT-31073
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
fun <R> bar(block: () -> R): R = TODO()
|
||||||
|
fun <T, R> T.bar(block: T.() -> R): R = TODO()
|
||||||
|
|
||||||
|
class X {
|
||||||
|
val b = ba<caret>
|
||||||
|
}
|
||||||
|
|
||||||
|
// TAIL_TEXT: " {...} (block: X.() -> R) for T in foo"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
fun <R> bar(block: () -> R): R = TODO()
|
||||||
|
fun <T, R> T.bar(block: T.() -> R): R = TODO()
|
||||||
|
|
||||||
|
class X {
|
||||||
|
val b = bar { }
|
||||||
|
}
|
||||||
|
|
||||||
|
// TAIL_TEXT: " {...} (block: X.() -> R) for T in foo"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
fun <R> bar(block: () -> R): R = TODO()
|
||||||
|
fun <T, R> T.bar(block: T.() -> R): R = TODO()
|
||||||
|
|
||||||
|
class X {
|
||||||
|
val b = ba<caret>
|
||||||
|
}
|
||||||
|
|
||||||
|
// TAIL_TEXT: " {...} (block: () -> R) (foo)"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
fun <R> bar(block: () -> R): R = TODO()
|
||||||
|
fun <T, R> T.bar(block: T.() -> R): R = TODO()
|
||||||
|
|
||||||
|
class X {
|
||||||
|
val b = foo.bar { }
|
||||||
|
}
|
||||||
|
|
||||||
|
// TAIL_TEXT: " {...} (block: () -> R) (foo)"
|
||||||
+10
@@ -164,6 +164,16 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion
|
|||||||
runTest("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt");
|
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")
|
@TestMetadata("ReplaceFunctionCallByProperty.kt")
|
||||||
public void testReplaceFunctionCallByProperty() throws Exception {
|
public void testReplaceFunctionCallByProperty() throws Exception {
|
||||||
runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt");
|
runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt");
|
||||||
|
|||||||
+10
@@ -164,6 +164,16 @@ public class PerformanceBasicCompletionHandlerTestGenerated extends AbstractPerf
|
|||||||
runTest("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt");
|
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")
|
@TestMetadata("ReplaceFunctionCallByProperty.kt")
|
||||||
public void testReplaceFunctionCallByProperty() throws Exception {
|
public void testReplaceFunctionCallByProperty() throws Exception {
|
||||||
runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt");
|
runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user