Skip to content

[ksp2] Resolver.getJvmName wrong for properties starts with is #2275

@acejingbo

Description

@acejingbo

Repro

acejingbo@92b37b9

Notice for property like isoSomething.

  • KSP1 (test pass) can correctly name its getter/setter as getIsoSomething/setIsoSomething, which match kotlin compiler behavior too
  • KSP2 (test fail) will incorrectly name its getter/setter as isoSomething/setoSomething

Personal understanding

My personal understanding is that KSP1 resolver and kotlin compiler use JvmAbi.startsWithIsPrefix, but ksp2 just develop the logic by itself, and missed the condition that check whether the letter after is is capitalized

https://github.com/JetBrains/kotlin/blob/master/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JvmAbi.kt#L88-L94

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions