[box-tests] Added a couple of reproducers for KT-52795

This commit is contained in:
Igor Chevdar
2022-07-20 14:54:40 +03:00
committed by Space
parent 412f07c55b
commit 8981eb85de
16 changed files with 220 additions and 0 deletions
@@ -0,0 +1,20 @@
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
inline fun <T> mrun(block: () -> T) = block()
// FILE: 2.kt
fun bar(o: String): String {
val callable = mrun {
fun localAnonymousFun(k: String): String {
val obj = object {
fun foo() = o + k
}
return obj.foo()
}
::localAnonymousFun
}
return callable("K")
}
fun box() = bar("O")