[FIR2IR] Properly approximate intersection types during fir2ir conversion

^KT-62544 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-10-16 13:19:40 +03:00
committed by Space Team
parent 8c6da9fddb
commit 9366847e96
52 changed files with 450 additions and 803 deletions
@@ -49,13 +49,13 @@ FILE fqName:<root> fileName:/smartCastsWithDestructuring.kt
then: RETURN type=kotlin.Nothing from='public final fun test (x: <root>.I1): kotlin.Unit declared in <root>'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.I1 [val]
TYPE_OP type=<root>.I2 origin=IMPLICIT_CAST typeOperand=<root>.I2
TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
GET_VAR 'x: <root>.I1 declared in <root>.test' type=<root>.I1 origin=null
VAR name:c1 type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=1)
$receiver: TYPE_OP type=<root>.I2 origin=IMPLICIT_CAST typeOperand=<root>.I2
$receiver: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
GET_VAR 'val tmp_0: <root>.I1 declared in <root>.test' type=<root>.I1 origin=null
VAR name:c2 type:kotlin.String [val]
CALL 'public final fun component2 (): kotlin.String declared in <root>' type=kotlin.String origin=COMPONENT_N(index=2)
$receiver: TYPE_OP type=<root>.I2 origin=IMPLICIT_CAST typeOperand=<root>.I2
$receiver: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
GET_VAR 'val tmp_0: <root>.I1 declared in <root>.test' type=<root>.I1 origin=null