[FIR] Add exhaustive checker for when expressions

Also remove generating default else branch introduced in 38fa0122 and 54eb4cf9
This commit is contained in:
Dmitriy Novozhilov
2019-10-15 12:52:02 +03:00
parent 25e853606e
commit f19a878948
93 changed files with 5003 additions and 5464 deletions
+2 -2
View File
@@ -50,13 +50,13 @@ FILE fqName:<root> fileName:/elvis.kt
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
VALUE_PARAMETER name:b index:1 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.String origin=IF
WHEN type=kotlin.Any? origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in <root>'
CONST String type=kotlin.String value=""
WHEN type=kotlin.String origin=IF
WHEN type=kotlin.Any? origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String?
GET_VAR 'a: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null