[FIR] Resolve type of when expression to Unit if it is not exhaustive

This commit is contained in:
Dmitriy Novozhilov
2019-10-21 11:57:16 +03:00
parent 131567474a
commit 4df4c58a05
27 changed files with 76 additions and 76 deletions
@@ -2,9 +2,9 @@ FILE fqName:<root> fileName:/whenCoercedToUnit.kt
FUN name:foo visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:x index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Any? origin=WHEN
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val]
WHEN type=kotlin.Any? origin=WHEN
WHEN type=kotlin.Unit origin=WHEN
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_subject: kotlin.Int [val] declared in <root>.foo' type=kotlin.Int origin=null