KT-5072 Values of extension function type are not seen in completion

#KT-5072 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-11-13 19:42:43 +03:00
parent 2e2dfcb4a0
commit 927df1c4cd
23 changed files with 305 additions and 11 deletions
@@ -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" }
@@ -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" }
@@ -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: "" }
@@ -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" }