blob: e5c59780fcc48a066abf46866b58e5255d0d1cc3 [file]
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
class Container {
val d: String = "OK"
}
fun getContainer(flag: Boolean): Container? {
return if (flag) Container() else null
}
fun box(): String {
// This should trigger a null check before accessing field 'd'
val container = getContainer(false)
// Try to access field 'd' on potentially null container
// This should be safe in Kotlin due to null safety, but might generate problematic bytecode
return try {
container?.d ?: "OK"
} catch (e: Exception) {
e.toString()
}
}