KT-8898 If invocation context contains functional value compatible with function in completion list, show non-literal item

#KT-8898 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-08-27 17:25:31 +03:00
parent fbb37f0154
commit a4c5907a1f
20 changed files with 408 additions and 78 deletions
@@ -0,0 +1,24 @@
interface I1 {
val v: () -> Unit
val v1: () -> Unit
}
interface I2 {
val v: String
}
fun String.xfoo(p: () -> Unit){}
fun X.test(i1: I1, i2: I2) {
with(i1) {
with(i2) {
"a".xfoo<caret>
}
}
}
interface X
// EXIST: { itemText: "xfoo", tailText: " {...} (p: () -> Unit) for String in <root>", typeText:"Unit" }
// EXIST: { itemText: "xfoo", tailText: "(v1) for String in <root>", typeText: "Unit" }
// NOTHING_ELSE