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:
Denis.Zharkov
2021-01-28 16:38:41 +03:00
parent 5c62ee4ba8
commit 1e0d9f4075
46 changed files with 106 additions and 264 deletions
@@ -45,8 +45,7 @@ FILE fqName:<root> fileName:/variableAsFunctionCall.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun k (): kotlin.Function0<kotlin.String> declared in <root>' type=kotlin.Function0<kotlin.String> origin=null
$receiver: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'val tmp_1: kotlin.String? [val] declared in <root>.test4' type=kotlin.String? origin=null
$receiver: GET_VAR 'val tmp_1: kotlin.String? [val] declared in <root>.test4' type=kotlin.String? origin=null
WHEN type=kotlin.String? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
@@ -56,5 +55,4 @@ FILE fqName:<root> fileName:/variableAsFunctionCall.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String origin=INVOKE
$this: TYPE_OP type=kotlin.Function0<kotlin.String> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.String>
GET_VAR 'val tmp_0: kotlin.Function0<kotlin.String>? [val] declared in <root>.test4' type=kotlin.Function0<kotlin.String>? origin=null
$this: GET_VAR 'val tmp_0: kotlin.Function0<kotlin.String>? [val] declared in <root>.test4' type=kotlin.Function0<kotlin.String>? origin=null