// RUN_PIPELINE_TILL: BACKEND
// FIR_IDENTICAL
// WITH_STDLIB
// ISSUE: KT-72996

class Lambda {
    fun invalidate(reason: Any?) {}
    fun invalidate() {}
}

fun test1(lambda: Lambda?): (Any?) -> Unit =
    lambda?.let {
        it::invalidate
    } ?: {}

fun test2(q: ((Any?) -> Unit)?, lambda: Lambda): (Any?) -> Unit =
    q ?: run { lambda::invalidate }

/* GENERATED_FIR_TAGS: callableReference, classDeclaration, elvisExpression, functionDeclaration, functionalType,
lambdaLiteral, nullableType, safeCall */
