[Analysis API] Add reference tests for containing declaration provider

This commit is contained in:
Yan Zhulanow
2024-02-01 01:38:29 +09:00
committed by Space Team
parent e171e21165
commit 88a85b8936
25 changed files with 524 additions and 0 deletions
@@ -0,0 +1,5 @@
fun test() {
fun local() {}
<caret>local()
}
@@ -0,0 +1,5 @@
fun test() {
fun local() {
<caret>local()
}
}
@@ -0,0 +1,9 @@
class Foo {
class Bar {
fun bar() {}
}
}
fun test(bar: Foo.Bar) {
bar.<caret>bar()
}
@@ -0,0 +1,7 @@
class Foo {
class Bar {
fun bar() {
<caret>bar()
}
}
}
@@ -0,0 +1,8 @@
class Foo {
val foo: String
get() = "foo"
}
fun test(foo: Foo) {
foo.<caret>foo
}
@@ -0,0 +1,6 @@
class Foo {
val foo: String
get() {
return <caret>foo
}
}
@@ -0,0 +1,6 @@
class Foo {
val foo: String = "foo"
get() {
return <caret>field
}
}
@@ -0,0 +1,7 @@
class Foo {
fun foo()
}
fun test(foo: Foo) {
foo.<caret>foo()
}