[JS IR] Add infra to test compilation with error

- add bunch of tests
 - fix help test
This commit is contained in:
Roman Artemev
2020-09-01 12:04:15 +03:00
parent e592b3af1d
commit 0bff406a12
19 changed files with 460 additions and 13 deletions
@@ -0,0 +1,23 @@
// ERROR_POLICY: SEMANTIC
// FILE: t.kt
fun <reified T> bar(t: T) = t
fun <reified T> qux() = T::class
fun foo(): String {
return bar<String>("OK")
}
fun dec() { qux() }
// FILE: b.kt
fun box(): String {
try {
dec()
} catch (e: Throwable /*js ReferenceError*/) {
return foo()
}
}