Completion: assign highest priority to dsl members in dsl context

Use the same style as for dsl for lookup items that belong to dsl
This commit is contained in:
Pavel V. Talanov
2018-02-09 16:22:37 +01:00
parent 8f8cbfcfa5
commit 1796d40118
13 changed files with 191 additions and 17 deletions
@@ -0,0 +1,42 @@
package bar
@DslMarker
annotation class Dsl
@Dsl
class R
fun r(body: R.() -> Unit) {
}
fun foo1(i: Int) {
}
fun foo3() {
}
@Dsl
fun R.foo2() {}
@Dsl
fun R.foo4() {
}
@Dsl
fun R.fooloooooong() {
}
val R.fooval
get() = Unit
@Dsl
fun R.SomethingSomethingFooSomething() {
}
@@ -0,0 +1,20 @@
// RUNTIME
package test
import bar.r
import bar.foo3
fun main() {
val foo5 = 3
r {
foo<caret>
}
}
// ORDER: foo2
// ORDER: foo4
// ORDER: fooloooooong
// ORDER: foo3
// ORDER: foo5
// ORDER: fooval
// ORDER: foo1