Files
kotlin-fork/compiler/testData/ir/interpreter/exceptions/divideByZero.kt
T
2021-06-07 15:35:12 +03:00

15 lines
377 B
Kotlin
Vendored

const val a = <!EVALUATED: `1`!>try {
10 / 0
0
} catch (e: RuntimeException) {
1
}<!>
const val b = <!WAS_NOT_EVALUATED: `
Exception java.lang.ArithmeticException: / by zero
at DivideByZeroKt.<clinit>(divideByZero.kt:8)`!>10 / 0<!>
// not working for now, but maybe will be supported
//fun someFunWithCompileTimeInside() {
// val exceptionExpected = 1 / 0
//}