[JS IR] stdlib: Use Nothing in return type of THROW helpers

Backend generated calls to those helpers inside expression which
resuleted in invalid type casts in IR (in dead code).
This commit is contained in:
Svyatoslav Kuzmich
2019-05-04 21:20:34 +03:00
parent 8c83beb086
commit 3a506a372b
+3 -3
View File
@@ -12,12 +12,12 @@ internal fun throwUninitializedPropertyAccessException(name: String): Nothing =
internal fun noWhenBranchMatchedException(): Nothing = throw NoWhenBranchMatchedException()
fun THROW_ISE() {
fun THROW_ISE(): Nothing {
throw IllegalStateException()
}
fun THROW_CCE() {
fun THROW_CCE(): Nothing {
throw ClassCastException()
}
fun THROW_NPE() {
fun THROW_NPE(): Nothing {
throw NullPointerException()
}