JVM/JVM_IR: fix mapping of KClass in annotation classes

* JVM incorrectly mapped T<KClass<...>> to T<Class<...>> because the
   annotation-ness of the type mapping mode was inherited one level
   down into a generic signature independent of T

 * JVM_IR was even worse as it did not use VALUE_FOR_ANNOTATION at all,
   mapping T<T<KClass<...>> to T<T<Class<...>> as well.

The correct behavior is to map KClass to Class only at top level or as
an argument of Array.
This commit is contained in:
pyos
2019-11-27 10:31:42 +01:00
committed by Alexander Udalov
parent f869be6a71
commit 7cd55c85e6
7 changed files with 30 additions and 26 deletions
@@ -170,6 +170,11 @@ public class IrWriteSignatureTestGenerated extends AbstractIrWriteSignatureTest
public void testKClassInt() throws Exception {
runTest("compiler/testData/writeSignature/annotations/kClassInt.kt");
}
@TestMetadata("kClassOfKClass.kt")
public void testKClassOfKClass() throws Exception {
runTest("compiler/testData/writeSignature/annotations/kClassOfKClass.kt");
}
}
@TestMetadata("compiler/testData/writeSignature/callableReference")
@@ -169,6 +169,11 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
public void testKClassInt() throws Exception {
runTest("compiler/testData/writeSignature/annotations/kClassInt.kt");
}
@TestMetadata("kClassOfKClass.kt")
public void testKClassOfKClass() throws Exception {
runTest("compiler/testData/writeSignature/annotations/kClassOfKClass.kt");
}
}
@TestMetadata("compiler/testData/writeSignature/callableReference")