Added a test for KT-56500

This commit is contained in:
Igor Chevdar
2023-02-17 09:00:59 +02:00
committed by Space Team
parent 7c9e567496
commit 5d3b61364a
19 changed files with 124 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
class Box<T>(val value: T) {
inline fun run(block: (T) -> Unit) {
block(value)
}
}
// FILE: 2.kt
fun box(): String {
var result: String = "fail"
Box("OK").run { outer ->
val block = { result = outer }
block()
}
return result
}