FIR: Do not add alias for variables with explicit type
This commit is contained in:
committed by
TeamCityServer
parent
5317cf3af1
commit
a0a57581ec
@@ -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
|
||||
|
||||
@@ -21,7 +21,7 @@ fun test() {
|
||||
var r: String = ""
|
||||
val x: Any? = En.A
|
||||
when {
|
||||
x /*as En */ is En -> { // BLOCK
|
||||
x is En -> { // BLOCK
|
||||
val tmp0_subject: En = x /*as En */
|
||||
when {
|
||||
EQEQ(arg0 = tmp0_subject, arg1 = En.A) -> { // BLOCK
|
||||
@@ -37,7 +37,7 @@ fun test() {
|
||||
}
|
||||
val y: Any = En.A
|
||||
when {
|
||||
y /*as En */ is En -> { // BLOCK
|
||||
y is En -> { // BLOCK
|
||||
val tmp1_subject: En = y /*as En */
|
||||
when {
|
||||
EQEQ(arg0 = tmp1_subject, arg1 = En.A) -> { // BLOCK
|
||||
|
||||
Reference in New Issue
Block a user