Skip to content

Compiled .class May Differ from Source Filename - map_deploy_to_devel (kotlin) #2214

Description

@chinyeungli

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions