FIR: Do not add alias for variables with explicit type

This commit is contained in:
Denis.Zharkov
2021-10-20 10:06:46 +03:00
committed by TeamCityServer
parent 5317cf3af1
commit a0a57581ec
29 changed files with 562 additions and 67 deletions
@@ -67,8 +67,7 @@ FILE fqName:<root> fileName:/whenSmartCastToEnum.kt
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.En
TYPE_OP type=<root>.En origin=IMPLICIT_CAST typeOperand=<root>.En
GET_VAR 'val x: kotlin.Any? [val] declared in <root>.test' type=kotlin.Any? origin=null
GET_VAR 'val x: kotlin.Any? [val] declared in <root>.test' type=kotlin.Any? origin=null
then: BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.En [val]
TYPE_OP type=<root>.En origin=IMPLICIT_CAST typeOperand=<root>.En
@@ -99,8 +98,7 @@ FILE fqName:<root> fileName:/whenSmartCastToEnum.kt
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.En
TYPE_OP type=<root>.En origin=IMPLICIT_CAST typeOperand=<root>.En
GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
then: BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.En [val]
TYPE_OP type=<root>.En origin=IMPLICIT_CAST typeOperand=<root>.En