Fix type parameters in WrappedClassConstructorDescriptor

IrConstructorCall gets type parameters from the class in addition to the
constructor declaration. This behavior is already implemented for
ClassConstructorDescriptorImpl, but was not implemented for
WrappedClassConstructorDescriptor, leading to missing type arguments for calls
to constructors generated in a lowering pass.
This commit is contained in:
Steven Schäfer
2019-05-10 11:48:55 +02:00
committed by max-kammerer
parent 77c0e591af
commit 90c3269502
6 changed files with 11 additions and 10 deletions
@@ -87,6 +87,7 @@ FILE fqName:<root> fileName:/constructor.kt
VALUE_PARAMETER name:i index:1 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (z: Z of <uninitialized parent>) [primary] declared in <root>.Test2.TestInner'
<Z>: <none>
z: GET_VAR 'z: Z of <uninitialized parent> declared in <root>.Test2.TestInner.<init>' type=Z of <uninitialized parent> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -185,6 +186,7 @@ FILE fqName:<root> fileName:/constructor.kt
CONST Int type=kotlin.Int value=42
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test4'
<T>: <none>
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
other: GET_VAR 'y: kotlin.Int declared in <root>.Test4.<init>' type=kotlin.Int origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
@@ -200,4 +202,3 @@ FILE fqName:<root> fileName:/constructor.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -24,6 +24,7 @@ FILE fqName:<root> fileName:/typeParameterBoundedBySubclass.kt
CONSTRUCTOR visibility:public <> () returnType:<root>.Derived1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base1'
<T>: <none>
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.Base1<<root>.Derived1>]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -86,4 +87,3 @@ FILE fqName:<root> fileName:/typeParameterBoundedBySubclass.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any