Dsl completion: fix completion when multiple receivers are in scope

This commit is contained in:
Pavel V. Talanov
2018-02-27 18:27:52 +01:00
parent 65af137117
commit a6aea5625a
4 changed files with 60 additions and 4 deletions
@@ -0,0 +1,8 @@
package dsl
import test.Dsl
import test.R
@Dsl
fun R.foo2() {}
@@ -0,0 +1,41 @@
// RUNTIME
package test
class HasFoo {
fun foo10() {
}
}
fun main() {
val foo5 = 3
with(0) {
with("") {
with(HasFoo()) {
r {
foo<caret>
}
}
}
}
}
@DslMarker
annotation class Dsl
@Dsl
class R
fun r(body: R.() -> Unit) {
}
fun foo1(i: Int) {
}
// ORDER: foo2
// ORDER: foo10
// ORDER: foo1
// ORDER: foo5