// WITH_STDLIB
// IGNORE_BACKEND_K2: ANY
// ^ KT-71813

/*
 * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
 *
 * SPEC VERSION: 0.1-100
 * MAIN LINK: type-system, introduction-1 -> paragraph 5 -> sentence 2
 * NUMBER: 1
 * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class.
 * NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY
 * UNEXPECTED BEHAVIOUR
 * ISSUES: KT-26947
 */

val map = mapOf("x" to null)

fun box(): String {
    try {
        val x: Int by mapOf("x" to null)
    } catch (e: KotlinNullPointerException) {
        return "OK"
    } catch (e: NullPointerException) {
        return "OK"
    }
    try {
        val x: Any by map
    } catch (e: KotlinNullPointerException) {
        return "OK"
    } catch (e: NullPointerException) {
        return "OK"
    }
    return "Error"
}
