Files
kotlin-fork/kotlin-native/backend.native/tests/codegen/inline/lateinitProperty_linkTest_main.kt
T
Abduqodiri Qurbonzoda b65a68ca0d [K/N and WASM] Internalize NoWhenBranchMatchedException and UninitializedPropertyAccessException
As a part of efforts to stabilize Native stdlib.

Merge-request: KT-MR-9531
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-10 21:10:51 +00:00

17 lines
420 B
Kotlin

/*
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
import a.*
fun main() {
try {
val res = foo(intArrayOf(1, 2, 3)) { x, y, z -> x + y - z }
println(res)
} catch (t: UninitializedPropertyAccessException) {
println("OK")
}
}