[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
@@ -103,7 +103,7 @@ FILE fqName:<root> fileName:/breakContinueInLoopHeader.kt
CONST Int type=kotlin.Int value=0
WHILE label=Outer origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=true
body: BLOCK type=kotlin.Any? origin=null
body: BLOCK type=kotlin.Unit origin=null
VAR name:<unary> type:kotlin.Int [val]
GET_VAR 'var i: kotlin.Int [var] declared in <root>.test5' type=kotlin.Int origin=null
SET_VAR 'var i: kotlin.Int [var] declared in <root>.test5' type=kotlin.Int origin=null
@@ -129,7 +129,7 @@ FILE fqName:<root> fileName:/breakContinueInLoopHeader.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BREAK label=null loop.label=Outer
WHEN type=kotlin.Any? origin=IF
WHEN type=kotlin.Unit 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: GET_VAR 'var i: kotlin.Int [var] declared in <root>.test5' type=kotlin.Int origin=null