FIR2IR: fix origin of object literal constructor call

This commit is contained in:
Mikhail Glukhikh
2020-03-11 10:05:27 +03:00
parent 8231377f6b
commit 47ebd38534
10 changed files with 16 additions and 15 deletions
@@ -10,7 +10,7 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
BLOCK_BODY
ERROR_CALL 'Cannot find delegated constructor call' type=<root>.test.<no name provided>
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=null
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]
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]
@@ -20,7 +20,7 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
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
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=null
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]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.WithCompanion
CONSTRUCTOR visibility:public <> (a:<root>.WithCompanion.Companion) returnType:<root>.WithCompanion [primary]