Completion of parameter name/types from the current file
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
import java.io.*
|
||||
|
||||
class X {
|
||||
fun f1(strings: List<String>) { }
|
||||
fun f2(numbers: List<Int>) { }
|
||||
}
|
||||
|
||||
fun f3(strings: List<String>) { }
|
||||
fun f4(value: Any?) { }
|
||||
fun f5(value: File) { }
|
||||
fun f6(handler: (() -> String)?) { }
|
||||
|
||||
class C(val handler: () -> Unit) {
|
||||
companion object {
|
||||
fun foo(<caret>) {
|
||||
fun local(localParam: String/* it should not be included by performance reasons*/){}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "strings", itemText: "strings: List<String>", tailText: " (kotlin)" }
|
||||
// EXIST: { lookupString: "numbers", itemText: "numbers: List<Int>", tailText: " (kotlin)" }
|
||||
// EXIST: { lookupString: "value", itemText: "value: Any?", tailText: " (kotlin)" }
|
||||
// EXIST_JAVA_ONLY: { lookupString: "value", itemText: "value: File", tailText: " (java.io)" }
|
||||
// EXIST: { lookupString: "handler", itemText: "handler: (() -> String)?", tailText: null }
|
||||
// EXIST: { lookupString: "handler", itemText: "handler: () -> Unit", tailText: null }
|
||||
// ABSENT: "localParam"
|
||||
// ABSENT: "file"
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
package ppp
|
||||
|
||||
import java.io.*
|
||||
|
||||
class X {
|
||||
public class PublicNested
|
||||
private class PrivateNested
|
||||
|
||||
fun f1(nested: PublicNested) { }
|
||||
fun f2(nested: PrivateNested) { }
|
||||
fun f3(nestedList: List<PublicNested>) { }
|
||||
fun f4(nestedList: List<PrivateNested>) { }
|
||||
}
|
||||
|
||||
fun foo(neste<caret>)
|
||||
|
||||
// EXIST: { lookupString: "nested", itemText: "nested: X.PublicNested", tailText: " (ppp)" }
|
||||
// EXIST: { lookupString: "nestedList", itemText: "nestedList: List<X.PublicNested>", tailText: " (kotlin)" }
|
||||
// NOTHING_ELSE
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(xxx: ((java.io.File) -> List<String>)?)
|
||||
|
||||
fun bar(x<caret>)
|
||||
|
||||
// ELEMENT: xxx
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import java.io.File
|
||||
|
||||
fun foo(xxx: ((java.io.File) -> List<String>)?)
|
||||
|
||||
fun bar(xxx: ((File) -> List<String>)?<caret>)
|
||||
|
||||
// ELEMENT: xxx
|
||||
+2
-2
@@ -6,6 +6,6 @@ fun bar(o: Any) {
|
||||
foo(o as <caret>)
|
||||
}
|
||||
|
||||
// EXIST: { lookupString:"List", itemText:"List<String>" }
|
||||
// EXIST: { lookupString:"Map", itemText:"Map<String, Int>" }
|
||||
// EXIST: { lookupString:"List", itemText:"List<String>", tailText: " (kotlin)" }
|
||||
// EXIST: { lookupString:"Map", itemText:"Map<String, Int>", tailText: " (kotlin)" }
|
||||
// NOTHING_ELSE
|
||||
|
||||
+2
-2
@@ -7,6 +7,6 @@ fun bar(o: Any) {
|
||||
foo(o as <caret>)
|
||||
}
|
||||
|
||||
// EXIST: { lookupString:"List", itemText:"List<String>" }
|
||||
// EXIST: { lookupString:"String", itemText:"String" }
|
||||
// EXIST: { lookupString:"List", itemText:"List<String>", tailText: " (kotlin)" }
|
||||
// EXIST: { lookupString:"String", itemText:"String", tailText: " (kotlin)" }
|
||||
// NOTHING_ELSE
|
||||
|
||||
Reference in New Issue
Block a user