Ordinary completion includes some items from smart completion + changed priority for multi-args item in smart completion

#KT-8580 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-08-06 01:25:56 +03:00
parent 73b98aba17
commit af2b6588c0
24 changed files with 243 additions and 50 deletions
@@ -0,0 +1,12 @@
class CC {
companion object {
fun getInstance(): CC {}
}
}
fun foo(): CC {
return C<caret>
}
// ORDER: CC
// ORDER: getInstance
@@ -0,0 +1,13 @@
enum class EE {
A,
B
}
fun foo(): EE {
return E<caret>
}
// ORDER: valueOf
// ORDER: A
// ORDER: B
// ORDER: EE
@@ -0,0 +1,12 @@
interface I1
interface I2
fun foo(a: I1, b: I2, c: I1) {}
fun bar(b: I2, a: I1, c: I1) {
foo(<caret>)
}
// ORDER: a
// ORDER: c
// ORDER: "a, b, c"
@@ -8,10 +8,10 @@ fun foo(pFoo: Boolean, s: String) {
foo(<caret>)
}
// ORDER: "pFoo, s"
// ORDER: pFoo
// ORDER: nullableFoo
// ORDER: nullableFoo
// ORDER: "pFoo, s"
// ORDER: true
// ORDER: false
// ORDER: local
@@ -1,8 +1,9 @@
fun foo(a: Int, b: String, c: String) {}
fun foo(xa: Int, xb: String, xc: Int) {}
fun bar(b: String, a: Int, c: String) {
fun bar(xb: String, xa: Int, xc: Int) {
foo(<caret>)
}
// ORDER: "a, b, c"
// ORDER: a
// ORDER: xa
// ORDER: "xa, xb, xc"
// ORDER: xc
@@ -10,10 +10,10 @@ class C {
}
}
// ORDER: "pFoo, s"
// ORDER: pFoo
// ORDER: nullableFoo
// ORDER: nullableFoo
// ORDER: "pFoo, s"
// ORDER: this
// ORDER: local
// ORDER: apply
@@ -15,11 +15,11 @@ fun foo(pFoo: C, s: String) {
}
// ORDER: "pFoo, s"
// ORDER: pFoo
// ORDER: nullableFoo
// ORDER: nullableFoo
// ORDER: INSTANCE_FOO
// ORDER: "pFoo, s"
// ORDER: local
// ORDER: nonNullable
// ORDER: nullableX