KT-5072 Values of extension function type are not seen in completion
#KT-5072 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class C
|
||||
|
||||
fun C.test(foo: C.() -> Unit) {
|
||||
fo<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "foo", itemText: "foo", tailText: null, typeText: "C.() -> Unit" }
|
||||
// ABSENT: { itemText: "foo", typeText: "Unit" }
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun test(i: Int?, foo: Int.(String) -> Char) {
|
||||
i?.fo<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "foo", itemText: "foo", tailText: "(String)", typeText: "Char", attributes: "bold" }
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun 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: "" }
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
interface I
|
||||
interface J
|
||||
|
||||
fun test(p: I, fooI: I.() -> Unit, fooJ: J.() -> Unit) {
|
||||
if (p is J) {
|
||||
p.fo<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "fooI", itemText: "fooI", tailText: "()", typeText: "Unit", attributes: "bold" }
|
||||
// EXIST: { lookupString: "fooJ", itemText: "fooJ", tailText: "()", typeText: "Unit", attributes: "bold" }
|
||||
Reference in New Issue
Block a user