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,9 @@
fun String.xfoo(p: () -> Unit){}
fun X.test() {
val local: () -> Unit = { }
"a".xf<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: "(local) for String in <root>"
@@ -0,0 +1,9 @@
fun String.xfoo(p: () -> Unit){}
fun X.test() {
val local: () -> Unit = { }
"a".xfoo(local)<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: "(local) for String in <root>"
@@ -0,0 +1,10 @@
fun String.xfoo(p: () -> Unit): String = ""
fun X.test() {
val local: () -> Unit = { }
"a".xf<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: "(local) for String in <root>"
// CHAR: '.'
@@ -0,0 +1,10 @@
fun String.xfoo(p: () -> Unit): String = ""
fun X.test() {
val local: () -> Unit = { }
"a".xfoo(local).<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: "(local) for String in <root>"
// CHAR: '.'
@@ -0,0 +1,9 @@
inline fun <reified T> String.xfoo(p: () -> Unit){}
fun X.test() {
val local: () -> Unit = { }
"a".xf<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: "(local) for String in <root>"
@@ -0,0 +1,9 @@
inline fun <reified T> String.xfoo(p: () -> Unit){}
fun X.test() {
val local: () -> Unit = { }
"a".xfoo<<caret>>(local)
}
// ELEMENT: xfoo
// TAIL_TEXT: "(local) for String in <root>"