[FIR] Don't provide receiver as value in delegated constructor call

This commit is contained in:
Mikhail Glukhikh
2020-03-31 13:10:37 +03:00
parent a377a6fccb
commit 630adb34db
35 changed files with 78 additions and 69 deletions
@@ -41,7 +41,7 @@ FILE fqName:<root> fileName:/thisRefToObjectInNestedClassConstructorCall.kt
CONSTRUCTOR visibility:public <> () returnType:<root>.Host.Derived1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.Base'
x: GET_VAR '<this>: <root>.Host.Derived1 declared in <root>.Host.Derived1' type=<root>.Host.Derived1 origin=null
x: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.Base]'
PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
FUN FAKE_OVERRIDE name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Host.Derived1) returnType:kotlin.Any [fake_override]
@@ -8,7 +8,8 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
BLOCK_BODY
ERROR_CALL 'Cannot find delegated constructor call' type=<root>.WithCompanion
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (a: <root>.WithCompanion.Companion) [primary] declared in <root>.WithCompanion'
a: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=<root>.WithCompanion.Companion
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]'
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
VAR name:test2 type:<root>.test.<no name provided> [val]
@@ -18,7 +19,8 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (a: <root>.WithCompanion.Companion) [primary] declared in <root>.WithCompanion'
a: ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType
a: CALL 'public final fun foo (): <root>.WithCompanion.Companion declared in <root>.WithCompanion.Companion' type=<root>.WithCompanion.Companion origin=null
$this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=<root>.WithCompanion.Companion
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]'
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:WithCompanion modality:OPEN visibility:public superTypes:[kotlin.Any]