[FIR2IR] Properly insert implicit casts to extension receiver in case of intersection smartcast type

^KT-62863 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-11-02 12:27:30 +02:00
committed by Space Team
parent 50106c740c
commit 420fbad73d
25 changed files with 548 additions and 91 deletions
@@ -53,9 +53,8 @@ FILE fqName:<root> fileName:/smartCastsWithDestructuring.kt
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=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
GET_VAR 'val tmp_0: <root>.I1 declared in <root>.test' type=<root>.I1 origin=null
$receiver: 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=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
$receiver: TYPE_OP type=<root>.I2 origin=IMPLICIT_CAST typeOperand=<root>.I2
GET_VAR 'val tmp_0: <root>.I1 declared in <root>.test' type=<root>.I1 origin=null