5e48be3d11
#KT-41482 Fixed
15 lines
394 B
Kotlin
Vendored
15 lines
394 B
Kotlin
Vendored
// KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_UNIFIED_NULL_CHECKS
|
|
// WITH_RUNTIME
|
|
// TARGET_BACKEND: JVM
|
|
|
|
fun box(): String {
|
|
val s: String? = null
|
|
try {
|
|
s!!
|
|
return "Fail: KNPE should have been thrown"
|
|
} catch (e: Throwable) {
|
|
if (e::class != KotlinNullPointerException::class) return "Fail: exception class should be KNPE: ${e::class}"
|
|
return "OK"
|
|
}
|
|
}
|