[Analysis Api] Expose klibSourceFile via KtKlibSourceFileProviderMixIn

This `klibSourceFile` information is deserialized from klibs
to retain the information of the original SourceFile location
of a declaration.

^KT-66271 Fixed
This commit is contained in:
Sebastian Sellmair
2024-03-05 11:59:18 +01:00
committed by Space Team
parent 6d8a4a28af
commit 6b98602afc
17 changed files with 249 additions and 3 deletions
@@ -0,0 +1,10 @@
// TARGET_PLATFORM: JS
// MODULE_KIND: LibraryBinary
// FILE: Some.kt
package some
class Foo
// FILE: Other.kt
package other
class Bar
@@ -0,0 +1,3 @@
klib declarations:
Classifier: other/Bar; klibSourceFile: Other.kt
Classifier: some/Foo; klibSourceFile: Some.kt
@@ -0,0 +1,10 @@
// TARGET_PLATFORM: JS
// MODULE_KIND: LibraryBinary
// FILE: Some.kt
package some
fun foo() = 42
// FILE: Other.kt
package other
fun bar() = 42
@@ -0,0 +1,3 @@
klib declarations:
Callable: other/bar; klibSourceFile: Other.kt
Callable: some/foo; klibSourceFile: Some.kt
@@ -0,0 +1,10 @@
// TARGET_PLATFORM: JS
// MODULE_KIND: LibraryBinary
// FILE: Some.kt
package some
val foo = 42
// FILE: Other.kt
package other
val bar = 42
@@ -0,0 +1,3 @@
klib declarations:
Callable: other/bar; klibSourceFile: Other.kt
Callable: some/foo; klibSourceFile: Some.kt