FE: add test for KT-58332 (K2 fails with ARGUMENT_TYPE_MISMATCH)

This commit is contained in:
Mikhail Glukhikh
2023-05-05 09:55:33 +02:00
committed by Space Team
parent 11e1bcca1d
commit aec0def5ca
10 changed files with 86 additions and 0 deletions
@@ -0,0 +1,12 @@
fun foo() {
val addNewStatusAction: SuspendFunction0<Unit> = useMemo<SuspendFunction0<Unit>>(callback = local fun <anonymous>(): SuspendFunction0<Unit> {
return local suspend fun <no name provided>() {
}
}
)
}
fun <T : Any?> useMemo(callback: Function0<T>): T {
return callback.invoke()
}