[FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable when and if blocks

^KT-50028 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-12-06 14:05:19 +03:00
committed by teamcity
parent 7bcd3c7948
commit df2e9e3797
10 changed files with 131 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
// ISSUE: KT-50028
fun test_1(): String {
return when {
else -> {
return ""
}
}
}
fun test_2(b: Boolean): Boolean {
return if (b) {
true
} else {
throw NotImplementedError()
}
}