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:
+30
@@ -0,0 +1,30 @@
|
||||
interface I : () -> Unit
|
||||
|
||||
fun String.xfoo(p: () -> Unit){}
|
||||
|
||||
val global: () -> Unit = { }
|
||||
|
||||
fun X.test(p1: () -> Unit, p2: () -> String, p3: I) {
|
||||
val local: () -> Unit = { }
|
||||
"a".xfoo<caret>
|
||||
}
|
||||
|
||||
interface X {
|
||||
public val publicVal: () -> Unit
|
||||
protected val protectedVal: () -> Unit
|
||||
}
|
||||
|
||||
val X.extension: () -> Unit
|
||||
get() = {}
|
||||
|
||||
val String.wrongExtension: () -> Unit
|
||||
get() = {}
|
||||
|
||||
// EXIST: { itemText: "xfoo", tailText: " {...} (p: () -> Unit) for String in <root>", typeText:"Unit" }
|
||||
// EXIST: { itemText: "xfoo", tailText: "(p1) for String in <root>", typeText: "Unit" }
|
||||
// EXIST: { itemText: "xfoo", tailText: "(p3) for String in <root>", typeText: "Unit" }
|
||||
// EXIST: { itemText: "xfoo", tailText: "(local) for String in <root>", typeText: "Unit" }
|
||||
// EXIST: { itemText: "xfoo", tailText: "(global) for String in <root>", typeText: "Unit" }
|
||||
// EXIST: { itemText: "xfoo", tailText: "(publicVal) for String in <root>", typeText: "Unit" }
|
||||
// EXIST: { itemText: "xfoo", tailText: "(extension) for String in <root>", typeText: "Unit" }
|
||||
// NOTHING_ELSE
|
||||
Reference in New Issue
Block a user