FIR2IR: standardize expression with smart cast conversion

To convert smart cast expression, now we just convert
original expression in standard way and wrap it with TYPE_OP.
Before this commit original expression was converted in different way,
that led to errors e.g. for this expression casting.
This commit is contained in:
Mikhail Glukhikh
2020-02-25 12:12:48 +03:00
parent d1fac6dce1
commit 522eeae062
12 changed files with 9 additions and 13 deletions
@@ -20,5 +20,6 @@ FILE fqName:<root> fileName:/localDelegatedProperties.kt
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
SET_VAR 'var x: IrErrorType [var] declared in <root>.test2' type=kotlin.Unit origin=null
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: IrErrorType [var] declared in <root>.test2' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
GET_VAR 'var x: IrErrorType [var] declared in <root>.test2' type=IrErrorType origin=null
other: CONST Int type=kotlin.Int value=1