JVM_IR indy-SAM conversions: inline classes
KT-44278 KT-26060 KT-42621
This commit is contained in:
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
inline class Z(val value: Int)
|
||||
|
||||
fun interface IFooZ {
|
||||
fun foo(x: Z): Z
|
||||
}
|
||||
|
||||
fun foo1(fs: IFooZ) = fs.foo(Z(1))
|
||||
|
||||
fun box(): String {
|
||||
val t = foo1 { Z(it.value + 41) }
|
||||
if (t.value != 42) return "Failed: t=$t"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user