Added container information when needed
This commit is contained in:
+4
@@ -68,6 +68,10 @@ class ExtensionFunctionTypeValueCompletion(
|
||||
val parameterTail = presentation.tailFragments.first()
|
||||
presentation.clearTail()
|
||||
presentation.appendTailText(parameterTail.text, false)
|
||||
|
||||
lookupElementFactory.basicFactory.appendContainerAndReceiverInformation(variable) {
|
||||
presentation.appendTailText(it, true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun handleInsert(context: InsertionContext?) {
|
||||
|
||||
+10
-2
@@ -1,6 +1,14 @@
|
||||
fun test(i: Int, foo: Int.(String) -> Char, fooAny: Any.() -> Unit) {
|
||||
package ppp
|
||||
|
||||
val fooGlobal: Int.() -> Unit = { }
|
||||
|
||||
val String.fooExt: Int.() -> Unit get() = { }
|
||||
|
||||
fun String.test(i: Int, foo: Int.(String) -> Char, fooAny: Any.() -> Unit) {
|
||||
i.fo<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "foo", itemText: "foo", tailText: "(String)", typeText: "Char", attributes: "bold" }
|
||||
// EXIST: { lookupString: "fooAny", itemText: "fooAny", tailText: "()", typeText: "Unit", attributes: "" }
|
||||
// EXIST: { lookupString: "fooAny", itemText: "fooAny", tailText: "()", typeText: "Unit", attributes: "" }
|
||||
// EXIST: { lookupString: "fooGlobal", itemText: "fooGlobal", tailText: "() (ppp)", typeText: "Unit", attributes: "bold" }
|
||||
// ABSENT: fooExt
|
||||
Reference in New Issue
Block a user