FIR2IR: Do not add implicit casts for types with different nullability
For smart casts, elvises, etc., there are no implicit casts in psi2fir in changed test data
This commit is contained in:
+2
-2
@@ -22,8 +22,8 @@ fun test2() {
|
||||
}
|
||||
|
||||
<set-x>(<set-?> = 0)
|
||||
val <unary>: Int = <get-x>() /*as Int */
|
||||
val <unary>: Int = <get-x>()
|
||||
<set-x>(<set-?> = <unary>.inc())
|
||||
<unary> /*~> Unit */
|
||||
<set-x>(<set-?> = <get-x>() /*as Int */.plus(other = 1))
|
||||
<set-x>(<set-?> = <get-x>().plus(other = 1))
|
||||
}
|
||||
|
||||
@@ -48,8 +48,7 @@ FILE fqName:<root> fileName:/localDelegatedProperties.kt
|
||||
CALL 'local final fun <set-x> (<set-?>: kotlin.Int?): kotlin.Unit declared in <root>.test2' type=kotlin.Unit origin=EQ
|
||||
<set-?>: CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
|
||||
TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
|
||||
CALL 'local final fun <get-x> (): kotlin.Int? declared in <root>.test2' type=kotlin.Int? origin=GET_LOCAL_PROPERTY
|
||||
CALL 'local final fun <get-x> (): kotlin.Int? declared in <root>.test2' type=kotlin.Int? origin=GET_LOCAL_PROPERTY
|
||||
CALL 'local final fun <set-x> (<set-?>: kotlin.Int?): kotlin.Unit declared in <root>.test2' type=kotlin.Unit origin=EQ
|
||||
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
@@ -57,6 +56,5 @@ FILE fqName:<root> fileName:/localDelegatedProperties.kt
|
||||
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
CALL 'local final fun <set-x> (<set-?>: kotlin.Int?): kotlin.Unit declared in <root>.test2' type=kotlin.Unit origin=EQ
|
||||
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
|
||||
CALL 'local final fun <get-x> (): kotlin.Int? declared in <root>.test2' type=kotlin.Int? origin=GET_LOCAL_PROPERTY
|
||||
$this: CALL 'local final fun <get-x> (): kotlin.Int? declared in <root>.test2' type=kotlin.Int? origin=GET_LOCAL_PROPERTY
|
||||
other: CONST Int type=kotlin.Int value=1
|
||||
|
||||
Reference in New Issue
Block a user