In the experimental API to map a kotlin name to java I noticed that the annotations in the java.lang.annotation package don't map to the kotlin.annotation package as they should. For example, the kotlin.annotation.Repeatable annotation and kotlin.annotation.Retention don't return the expected java equivalents.
This returns null:
resolver.mapKotlinNameToJava(resolver.getKSNameFromString("kotlin.annotation.Repeatable"))
In the experimental API to map a kotlin name to java I noticed that the annotations in the
java.lang.annotation
package don't map to thekotlin.annotation
package as they should. For example, thekotlin.annotation.Repeatable
annotation andkotlin.annotation.Retention
don't return the expected java equivalents.This returns null:
resolver.mapKotlinNameToJava(resolver.getKSNameFromString("kotlin.annotation.Repeatable"))
On a related minor note I also noticed a typo in the kdoc of
mapKotlinNameToJava
kotlinName a Java class name
- should be a "kotlin" class name. https://github.com/google/ksp/blob/9f8d05b1af44857bc6de926d9be49e74b2c4a107/api/src/main/kotlin/com/google/devtools/ksp/processing/Resolver.kt#L250