Handle java raw types in IR

Raw type Q is represented as a flexible type
  Q<B1, ... Bn> .. Q<*, ... *>
where Bi is a representative upper bound of the corresponding ith type
parameter of Q.
When mapping generic signature, JVM takes type arguments of lower bound
(which is 'Q<B1, ..., Bn>').

There is still some difference in how JVM and JVM_IR handle raw type in
signature. It requires additional investigation.
This commit is contained in:
Dmitry Petrov
2020-09-03 10:39:05 +03:00
parent 8420c0b7c7
commit 714ab7c37f
11 changed files with 507 additions and 22 deletions
@@ -2040,6 +2040,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/types/localVariableOfIntersectionType_NI.kt");
}
@TestMetadata("rawTypeInSignature.kt")
public void testRawTypeInSignature() throws Exception {
runTest("compiler/testData/ir/irText/types/rawTypeInSignature.kt");
}
@TestMetadata("receiverOfIntersectionType.kt")
public void testReceiverOfIntersectionType() throws Exception {
runTest("compiler/testData/ir/irText/types/receiverOfIntersectionType.kt");