IR: create stubs for constructor type parameters
Java constructors can have type parameters of their own:
public class J<X extends Number> {
public <Y extends CharSequence> J() {}
}
When such constructors are called from Kotlin, type parameters for
constructor follow type parameters for class:
fun test() = J<Int, String>() // <X=Int, Y=String>
Descriptor-based representation uses the same type parameters ordering.
Also, use 'withScope' in IrLazyFunction type parameters creation.
This commit is contained in:
@@ -1518,6 +1518,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
runTest("compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaConstructorWithTypeParameters.kt")
|
||||
public void testJavaConstructorWithTypeParameters() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaEnum.kt")
|
||||
public void testJavaEnum() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/stubs/javaEnum.kt");
|
||||
|
||||
Reference in New Issue
Block a user