Take into account refined applicability of dsl-marker in IDE

After the previous change, when being applied to a function type
with receiver it's assumed to work just as it's applied to receiver type

Thus, it's necessary to fix relevant IDE features relied on DSL markers

 #KT-23255 Fixed
This commit is contained in:
Denis Zharkov
2018-08-08 16:53:18 +07:00
parent 117abb04aa
commit 9f3a902ff3
10 changed files with 143 additions and 9 deletions
@@ -0,0 +1,41 @@
package bar
@DslMarker
annotation class Dsl
class R
fun r(body: @Dsl 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