blob: 956a5157701d0363e2f55b5b728e8754bc078dc2 [file]
// DUMP_IR
// Regression test for KT-88069
// `invoke` on a memoized @Composable lambda literal used to be lowered to a `ComposableFunctionN.invoke` instead of `FunctionN.invoke`
// FILE: main.kt
package home
import androidx.compose.runtime.Composable
// capturing: memoized with `rememberComposableLambda`
@Composable
fun App(state: Int) {
(@Composable {
used(state)
}).invoke()
}
// non-capturing, but in a public inline scope: not moved into `ComposableSingletons`,
// so it is memoized with `composableLambdaInstance` rather than read from the singleton
@Composable
inline fun PublicInline() {
(@Composable {
used(0)
}).invoke()
}
fun used(value: Any?) {}