Iterate on symbols, not on scopes

- This way it is easier to get the correct results
This commit is contained in:
Roman Golyshev
2020-06-24 19:39:51 +03:00
committed by Ilya Kirillov
parent 708c54f4d2
commit a3da1ea1a0
5 changed files with 118 additions and 49 deletions
@@ -0,0 +1,18 @@
class A {
fun aa() {}
val aaa = 10
inner class AA {
fun bb() {}
val bbb = 20
fun test() {
this.<caret>
}
}
}
// ABSENT: aa
// ABSENT: aaa
// EXIST: bb
// EXIST: bbb
@@ -0,0 +1,25 @@
fun Any.anyFun() {}
val Any.anyVal: Int get() = 10
class A
fun A.aFun() {}
val A.aVal: Int get() = 10
class B
fun B.bFun() {}
val B.bVal: Int get() = 10
fun test(a: A) {
a.run {
<caret>
Unit
}
}
// EXIST: anyFun
// EXIST: anyVal
// EXIST: aVal
// EXIST: aFun
// ABSENT: bVal
// ABSENT: bFun