Fixed smart completion of functions with "::"

#KT-6073 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-10-20 16:13:07 +04:00
parent f2a83cdf29
commit e6dbfac232
7 changed files with 92 additions and 4 deletions
@@ -0,0 +1,19 @@
class C {
fun foo(s: String): Boolean = true
fun bar() {
listOf("a").filter(<caret>)
}
class object {
fun staticFoo(s: String): Boolean = true
}
}
fun C.extensionFoo(s: String): Boolean = true
fun globalFoo(s: String): Boolean = true
// ABSENT: ::foo
// ABSENT: ::staticFoo
// ABSENT: ::extensionFoo
// EXIST: ::globalFoo
@@ -0,0 +1,19 @@
import kotlin.platform.platformName
class C(i: Int){
class Nested
inner class Inner
fun bar() {
foo(<caret>)
}
}
platformName("foo1")
fun foo(p: () -> C.Nested){}
platformName("foo2")
fun foo(p: () -> C.Inner){}
// EXIST: ::Nested
// ABSENT: ::Inner
@@ -0,0 +1,13 @@
class C {
fun foo(p: C.() -> Unit){}
fun bar() {
foo(<caret>)
}
fun f1(){}
fun C.f2(){}
}
// EXIST: ::f1
// ABSENT: ::f2
@@ -7,5 +7,5 @@ fun bar() {
fun String.f1(){}
fun f2(){}
// EXIST: ::f1
// EXIST: String::f1
// ABSENT: ::f2