JVM_IR KT-50171 add missing parent to temporary vals for proxy fun

This commit is contained in:
Dmitry Petrov
2021-12-11 11:05:03 +03:00
committed by Space
parent 627d838343
commit 81c805a754
6 changed files with 45 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
// TARGET_BACKEND: JVM
// FULL_JDK
// SKIP_JDK6
import java.util.function.DoubleConsumer
var value: Double = 3.14
fun f() = {
g(::value::set)
}
fun g(consumer: DoubleConsumer) {
consumer.accept(42.0)
}
fun box(): String {
f()()
return if (value == 42.0) "OK" else "Fail"
}