psi2ir: Fix KT-30796 ErrorType for '?:' in OI

This commit is contained in:
Dmitry Petrov
2019-07-19 13:33:20 +03:00
parent 959b720e3f
commit 127be9be03
6 changed files with 367 additions and 2 deletions
+161
View File
@@ -0,0 +1,161 @@
FILE fqName:<root> fileName:/kt30796.kt
FUN name:magic visibility:public modality:FINAL <T> () returnType:T of <root>.magic
TYPE_PARAMETER name:T index:0 variance: superTypes:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun magic <T> (): T of <root>.magic declared in <root>'
THROW type=kotlin.Nothing
ERROR_CALL 'Unresolved reference: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#' type=IrErrorType
FUN name:test visibility:public modality:FINAL <T> (value:T of <root>.test, value2:T of <root>.test) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[]
VALUE_PARAMETER name:value index:0 type:T of <root>.test
VALUE_PARAMETER name:value2 index:1 type:T of <root>.test
BLOCK_BODY
VAR name:x1 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x2 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
GET_VAR 'value2: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x3 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=T of <root>.test origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'value2: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x4 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=T of <root>.test origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'value2: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x5 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:kotlin.Nothing [val]
CALL 'public final fun magic <T> (): T of <root>.magic declared in <root>' type=kotlin.Nothing origin=null
<T>: <none>
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: kotlin.Nothing [val] declared in <root>.test' type=kotlin.Nothing origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: kotlin.Nothing [val] declared in <root>.test' type=kotlin.Nothing origin=null
VAR name:x6 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=T of <root>.test origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CALL 'public final fun magic <T> (): T of <root>.magic declared in <root>' type=kotlin.Nothing origin=null
<T>: <none>
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x7 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR name:<elvis> type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR name:<elvis> type:kotlin.Nothing [val]
CALL 'public final fun magic <T> (): T of <root>.magic declared in <root>' type=kotlin.Nothing origin=null
<T>: <none>
WHEN type=T of <root>.test origin=ELVIS
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: GET_VAR 'val <elvis>: kotlin.Nothing [val] declared in <root>.test' type=kotlin.Nothing origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: kotlin.Nothing [val] declared in <root>.test' type=kotlin.Nothing origin=null
WHEN type=kotlin.Any origin=ELVIS
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: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Any value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val <elvis>: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
+11
View File
@@ -0,0 +1,11 @@
fun <T> magic(): T = throw Exception()
fun <T> test(value: T, value2: T) {
val x1: Any = value ?: 42
val x2: Any = value ?: (value2 ?: 42)
val x3: Any = (value ?: value2) ?: 42
val x4: Any = value ?: value2 ?: 42
val x5: Any = magic() ?: 42
val x6: Any = value ?: magic() ?: 42
val x7: Any = magic() ?: value ?: 42
}
+160
View File
@@ -0,0 +1,160 @@
FILE fqName:<root> fileName:/kt30796.kt
FUN name:magic visibility:public modality:FINAL <T> () returnType:T of <root>.magic
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
BLOCK_BODY
THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.Exception' type=java.lang.Exception origin=null
FUN name:test visibility:public modality:FINAL <T> (value:T of <root>.test, value2:T of <root>.test) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
VALUE_PARAMETER name:value index:0 type:T of <root>.test
VALUE_PARAMETER name:value2 index:1 type:T of <root>.test
BLOCK_BODY
VAR name:x1 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp0_elvis_lhs type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any 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
arg0: GET_VAR 'val tmp0_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp0_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x2 type:kotlin.Any [val]
BLOCK type=kotlin.Any? origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp2_elvis_lhs type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any? 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
arg0: GET_VAR 'val tmp2_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: BLOCK type=kotlin.Any? origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp1_elvis_lhs type:T of <root>.test [val]
GET_VAR 'value2: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any? 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
arg0: GET_VAR 'val tmp1_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp1_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp2_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x3 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp4_elvis_lhs type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp3_elvis_lhs type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=T of <root>.test 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
arg0: GET_VAR 'val tmp3_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'value2: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp3_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any 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
arg0: GET_VAR 'val tmp4_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp4_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x4 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp6_elvis_lhs type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp5_elvis_lhs type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=T of <root>.test 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
arg0: GET_VAR 'val tmp5_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'value2: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp5_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any 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
arg0: GET_VAR 'val tmp6_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp6_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x5 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp7_elvis_lhs type:kotlin.Any? [val]
CALL 'public final fun magic <T> (): T of <root>.magic declared in <root>' type=kotlin.Any? origin=null
<T>: kotlin.Any?
WHEN type=kotlin.Any 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
arg0: GET_VAR 'val tmp7_elvis_lhs: kotlin.Any? [val] declared in <root>.test' type=kotlin.Any? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp7_elvis_lhs: kotlin.Any? [val] declared in <root>.test' type=kotlin.Any? origin=null
VAR name:x6 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp9_elvis_lhs type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp8_elvis_lhs type:T of <root>.test [val]
GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
WHEN type=T of <root>.test 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
arg0: GET_VAR 'val tmp8_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CALL 'public final fun magic <T> (): T of <root>.magic declared in <root>' type=T of <root>.test origin=null
<T>: T of <root>.test
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp8_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
WHEN type=kotlin.Any 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
arg0: GET_VAR 'val tmp9_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp9_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
VAR name:x7 type:kotlin.Any [val]
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp11_elvis_lhs type:T of <root>.test [val]
BLOCK type=T of <root>.test origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp10_elvis_lhs type:T of <root>.test? [val]
CALL 'public final fun magic <T> (): T of <root>.magic declared in <root>' type=T of <root>.test? origin=null
<T>: T of <root>.test?
WHEN type=T of <root>.test 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
arg0: GET_VAR 'val tmp10_elvis_lhs: T of <root>.test? [val] declared in <root>.test' type=T of <root>.test? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'value: T of <root>.test declared in <root>.test' type=T of <root>.test origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp10_elvis_lhs: T of <root>.test? [val] declared in <root>.test' type=T of <root>.test? origin=null
WHEN type=kotlin.Any 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
arg0: GET_VAR 'val tmp11_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Int type=kotlin.Int value=42
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp11_elvis_lhs: T of <root>.test [val] declared in <root>.test' type=T of <root>.test origin=null