1b553ebfaf
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
17 lines
220 B
Kotlin
17 lines
220 B
Kotlin
fun a(): IntArray? = null
|
|
|
|
fun b(): Nothing = throw Exception()
|
|
|
|
fun foo(): IntArray = a() ?: b()
|
|
|
|
|
|
fun box(): String {
|
|
try {
|
|
foo()
|
|
} catch (e: Exception) {
|
|
return "OK"
|
|
}
|
|
|
|
return "Fail"
|
|
}
|