JS IR: apply forLoopsLowering

Replaced createTemporaryVariable usages with createTmpVariables.
The latter doesn't rely on KotlinType's. Using KotlinType with
JS_IR backend causes runtime excpetions, as some expected descriptor
API is not implemented, because it avoids descriptors as much as
possible.
This commit is contained in:
Anton Bannykh
2019-11-25 17:09:35 +03:00
parent 0ea407fef9
commit 9fec2c78d1
7 changed files with 22 additions and 8 deletions
+3
View File
@@ -21,5 +21,8 @@ fun THROW_CCE(): Nothing {
fun THROW_NPE(): Nothing {
throw NullPointerException()
}
fun THROW_IAE(msg: String): Nothing {
throw IllegalArgumentException(msg)
}
fun <T:Any> ensureNotNull(v: T?): T = if (v == null) THROW_NPE() else v