Files
kotlin-fork/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt
T
2021-02-12 16:52:30 +03:00

13 lines
301 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM
// JVM_TARGET: 1.8
// LAMBDAS: INDY
// FULL_JDK
fun lambdaIsSerializable(fn: () -> Unit) = fn is java.io.Serializable
fun box(): String {
if (lambdaIsSerializable {})
return "Failed: indy lambdas should not be serializable"
return "OK"
}