903a5d69a4
At first, I tried to modify the logic in PromisedValue.materializeAt to get rid of all casts from Nothing? to other types, but that broke a number of tests containing casts of java.lang.Void to other types, so I decided to fix only this particular case with try...catch (for some reason, here we get a null of type java.lang.Object).
18 lines
229 B
Kotlin
Vendored
18 lines
229 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// WITH_STDLIB
|
|
// FULL_JDK
|
|
// CHECK_BYTECODE_TEXT
|
|
|
|
class A
|
|
|
|
fun box(): String {
|
|
val a = try {
|
|
A()
|
|
} catch (e: NoClassDefFoundError) {
|
|
null
|
|
}
|
|
|
|
return "OK"
|
|
}
|
|
|
|
// 0 CHECKCAST |