mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
22 lines
277 B
Kotlin
Vendored
22 lines
277 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
fun bar(b: ()-> Unit) { b() }
|
|
|
|
class C() {
|
|
var f: Int
|
|
|
|
init {
|
|
var i = 10
|
|
bar {
|
|
i = 20
|
|
}
|
|
f = i + 1
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val c = C()
|
|
if (c.f != 21) return "fail"
|
|
return "OK"
|
|
}
|