In Koltin, a compiled .class file may not directly correspond to its source filename.
Use case
Project: kotlin-stdlib-1.9.23
binary
to/kotlin/annotation/AnnotationRetention.class
However, there is no corresponding .kt file in the source package.
The actual source for the .class file is at ./jvmMain/kotlin/annotation/Annotations.kt
public enum class AnnotationTarget {
/** Class, interface or object, annotation class is also included */
CLASS,
/** Annotation class only */
ANNOTATION_CLASS,
/** Generic type parameter */
TYPE_PARAMETER,
/** Property */
PROPERTY,
/** Field, including property's backing field */
FIELD,
/** Local variable */
LOCAL_VARIABLE,
...
As a result, the code need to look at the inner classes to identify the mapping.
Similar issues:
#1875
#1993
(and the fix are likely similar)
In Koltin, a compiled
.classfile may not directly correspond to its source filename.Use case
Project: kotlin-stdlib-1.9.23
binary
However, there is no corresponding
.ktfile in the source package.The actual source for the
.classfile is at./jvmMain/kotlin/annotation/Annotations.ktAs a result, the code need to look at the inner classes to identify the mapping.
Similar issues:
#1875
#1993
(and the fix are likely similar)