FIR: fix Clonable detection condition in inline checker

This commit is contained in:
pyos
2022-11-02 13:02:35 +01:00
committed by Mikhail Glukhikh
parent cdbbead157
commit fbb54f0300
6 changed files with 40 additions and 2 deletions
@@ -0,0 +1,16 @@
// TARGET_BACKEND: JVM
// FULL_JDK
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
OPTIONAL_JVM_INLINE_ANNOTATION
value class InlineRunnable(val block: () -> Unit) : Runnable {
override fun run() = block()
}
fun box(): String {
var result = "fail"
(InlineRunnable { result = "OK" } as Runnable).run()
return result
}