// RUN_PIPELINE_TILL: FRONTEND
// DIAGNOSTICS: -UNUSED_PARAMETER -DEBUG_INFO_CONSTANT -UNUSED_EXPRESSION

@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <@kotlin.internal.OnlyInputTypes K, V, V1 : V?>
    Map<out K, @kotlin.internal.Exact V>.getOrDefault_Exact(key: K, defaultValue: V1): V1 = TODO()

fun test() {
    val map: Map<String, Int> = mapOf("x" to 1)

    val r1 = map.getOrDefault_Exact("y", null)
    <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>r1<!>

    val r2 = map.getOrDefault_Exact("y", null as Int?)
    <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>r2<!>

    map.getOrDefault_Exact("y", <!TYPE_MISMATCH, TYPE_MISMATCH!>"string"<!>)
}

/* GENERATED_FIR_TAGS: asExpression, funWithExtensionReceiver, functionDeclaration, integerLiteral, localProperty,
nullableType, outProjection, propertyDeclaration, stringLiteral, typeConstraint, typeParameter */
