mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
The problem was that anonymous classes wasn't regenerated although they capture another anonymous class that is a subject for regeneration #KT-8689 Fixed
28 lines
347 B
Kotlin
Vendored
28 lines
347 B
Kotlin
Vendored
// FILE: 1.kt
|
|
package test
|
|
|
|
public inline fun myRun(block: () -> Unit) {
|
|
return block()
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
//NO_CHECK_LAMBDA_INLINING
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
var res = ""
|
|
myRun {
|
|
fun f1() {
|
|
res = "OK"
|
|
}
|
|
val x: () -> Unit = {
|
|
f1()
|
|
}
|
|
|
|
x()
|
|
}
|
|
|
|
return res
|
|
}
|