[Analysis API] Fix 'getContainingDeclaration()' for code fragments

^KT-65075 Fixed
This commit is contained in:
Yan Zhulanow
2024-01-18 18:53:14 +09:00
committed by Space Team
parent 1c883c93fc
commit c548bed6f6
6 changed files with 57 additions and 6 deletions
@@ -0,0 +1,22 @@
// MODULE: context
// FILE: context.kt
fun test() {
<caret_context>Unit
}
fun foo() {}
// MODULE: main
// MODULE_KIND: CodeFragment
// FILE: main.kt
// CODE_FRAGMENT_KIND: EXPRESSION
object {
fun foo() {}
fun bar() {
foo()
}
}