Kapt: handle special names correctly

Parameter names of some methods are different in JVM IR, for example
extension receivers of property `$annotations` methods are named
`<this>`, which made the `Name.identifier` call fail. It seems fine to
use the "p + index" name for this instead.

 #KT-49682
This commit is contained in:
Alexander Udalov
2021-12-21 02:13:28 +01:00
parent 07d3e3a5bd
commit 032d69aa41
3 changed files with 9 additions and 14 deletions
@@ -27,19 +27,19 @@ public final class AnnotationsTest {
@Anno(value = "top-level-fun")
public static final void topLevelFun(@org.jetbrains.annotations.NotNull()
@Anno(value = "top-level-fun-receiver")
java.lang.String $this$topLevelFun) {
java.lang.String p0) {
}
@org.jetbrains.annotations.NotNull()
public static final java.lang.String getTopLevelVal(@Anno(value = "top-level-val-receiver")
int p0) {
return null;
}
@Anno(value = "top-level-val")
@java.lang.Deprecated()
public static void getTopLevelVal$annotations(int p0) {
}
@org.jetbrains.annotations.NotNull()
public static final java.lang.String getTopLevelVal(@Anno(value = "top-level-val-receiver")
int $this$topLevelVal) {
return null;
}
}
////////////////////
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// WITH_STDLIB
// FILE: lib/Prop.java