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:
+5
-10
@@ -35,8 +35,7 @@ FILE fqName:<root> fileName:/coercionToUnitForNestedWhen.kt
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CALL 'public open fun toChar (): kotlin.Char declared in kotlin.Int' type=kotlin.Char origin=null
|
||||
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
|
||||
GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.nextChar' type=kotlin.Int? origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.nextChar' type=kotlin.Int? origin=null
|
||||
FUN name:consumeRestOfQuotedSequence visibility:public modality:FINAL <> ($receiver:java.io.Reader, sb:java.lang.StringBuilder, quote:kotlin.Char) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:<this> type:java.io.Reader
|
||||
VALUE_PARAMETER name:sb index:0 type:java.lang.StringBuilder
|
||||
@@ -54,8 +53,7 @@ FILE fqName:<root> fileName:/coercionToUnitForNestedWhen.kt
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char
|
||||
GET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
arg0: GET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
arg1: GET_VAR 'quote: kotlin.Char declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
@@ -65,8 +63,7 @@ FILE fqName:<root> fileName:/coercionToUnitForNestedWhen.kt
|
||||
WHEN type=@[FlexibleNullability] java.lang.StringBuilder? origin=IF
|
||||
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
|
||||
arg0: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char
|
||||
GET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
arg0: GET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
arg1: CALL 'private final fun <get-BACKSLASH> (): kotlin.Char declared in <root>' type=kotlin.Char origin=GET_PROPERTY
|
||||
then: BLOCK type=java.lang.StringBuilder? origin=SAFE_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Char? [val]
|
||||
@@ -83,8 +80,7 @@ FILE fqName:<root> fileName:/coercionToUnitForNestedWhen.kt
|
||||
then: CALL 'public final fun let <T, R> (block: kotlin.Function1<T of kotlin.StandardKt.let, R of kotlin.StandardKt.let>): R of kotlin.StandardKt.let [inline] declared in kotlin.StandardKt' type=java.lang.StringBuilder? origin=null
|
||||
<T>: kotlin.Char
|
||||
<R>: java.lang.StringBuilder?
|
||||
$receiver: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char
|
||||
GET_VAR 'val tmp_1: kotlin.Char? [val] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
$receiver: GET_VAR 'val tmp_1: kotlin.Char? [val] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
block: FUN_EXPR type=kotlin.Function1<kotlin.Char, java.lang.StringBuilder?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Char) returnType:java.lang.StringBuilder?
|
||||
VALUE_PARAMETER name:it index:0 type:kotlin.Char
|
||||
@@ -97,8 +93,7 @@ FILE fqName:<root> fileName:/coercionToUnitForNestedWhen.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CALL 'public open fun append (p0: kotlin.Char): java.lang.StringBuilder? declared in java.lang.StringBuilder' type=java.lang.StringBuilder? origin=null
|
||||
$this: GET_VAR 'sb: java.lang.StringBuilder declared in <root>.consumeRestOfQuotedSequence' type=java.lang.StringBuilder origin=null
|
||||
p0: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char
|
||||
GET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
p0: GET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Char? origin=null
|
||||
SET_VAR 'var ch: kotlin.Char? [var] declared in <root>.consumeRestOfQuotedSequence' type=kotlin.Unit origin=EQ
|
||||
CALL 'private final fun nextChar (): kotlin.Char? declared in <root>' type=kotlin.Char? origin=null
|
||||
$receiver: GET_VAR '<this>: java.io.Reader declared in <root>.consumeRestOfQuotedSequence' type=java.io.Reader origin=null
|
||||
|
||||
Reference in New Issue
Block a user