Files
kotlin-fork/native/native.tests/testData/codegen/enum/identity.kt
T
2024-03-15 01:28:01 +00:00

16 lines
359 B
Kotlin
Vendored

import kotlin.test.*
import kotlin.native.concurrent.*
enum class A {
A, B
}
data class Foo(val kind: A)
// Enums are shared between threads so identity should be kept.
fun box(): String = withWorker {
val result = execute(TransferMode.SAFE, { Foo(A.B) }) { input ->
input.kind === A.B
}.result
return if (result) "OK" else "FAIL"
}