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,13 @@
import BExtSpace.aaa
// "Import" "true"
// WITH_RUNTIME
// ERROR: Unresolved reference: aaa
fun test() {
AAA().apply {
sub {
aaa<caret>()
}
}
}
@@ -0,0 +1,24 @@
@DslMarker
annotation class DSL
@DSL
class AAA {
fun sub(l: @DSL BBB.() -> Unit) {
l(BBB())
}
}
class BBB
object AExtSpace {
fun AAA.aaa() {
}
}
object BExtSpace {
fun BBB.aaa() {
}
}
@@ -0,0 +1,11 @@
// "Import" "true"
// WITH_RUNTIME
// ERROR: Unresolved reference: aaa
fun test() {
AAA().apply {
sub {
aaa<caret>()
}
}
}