Fix CFG problem for 'when' in Konan

If type of 'when' expression is 'Nothing', it should be kept that way
even if the expression itself is implicitly coerced to Unit.
This commit is contained in:
Dmitry Petrov
2017-06-21 15:27:13 +03:00
parent 1f34dfabd5
commit 2b3043bf9f
3 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ CONTENT
1 FUN public fun toString(grade: kotlin.String): kotlin.String
2 GET_VAR 'value-parameter grade: String' type=kotlin.String origin=null
3 VAR IR_TEMPORARY_VARIABLE val tmp0_subject: kotlin.String
4 WHEN type=kotlin.Unit origin=WHEN
4 WHEN type=kotlin.Nothing origin=WHEN
5 GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null
6 CONST String type=kotlin.String value='A'
OUTGOING -> BB 1, 5