Dsl completion: assign high priority for dsl elements that are members

This commit is contained in:
Pavel V. Talanov
2018-08-06 19:10:06 +02:00
parent af2a6a5096
commit b51c021f56
5 changed files with 69 additions and 28 deletions
@@ -0,0 +1,38 @@
package bar
@DslMarker
annotation class Dsl
@Dsl
class R {
fun foo1(i: Int) {
}
@Dsl
fun foo2(i : Int) {
}
val foo5: Int = 6
@Dsl
val foo6: Int = 7
}
fun r(body: R.() -> Unit) {
}
@Dsl
fun R.foo4() {
}
@Dsl
fun R.foo3() {
}
@@ -0,0 +1,20 @@
// RUNTIME
package test
import bar.r
import bar.foo3
fun main() {
val fooLocal = 3
r {
foo<caret>
}
}
// ORDER: foo2
// ORDER: foo3
// ORDER: foo6
// ORDER: foo4
// ORDER: foo1
// ORDER: fooLocal
// ORDER: foo5