Files
kotlin/compiler/testData/codegen/box/dataClasses/unitComponent.kt
2018-06-28 12:26:41 +02:00

9 lines
194 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
data class A(val x: Unit)
fun box(): String {
val a = A(Unit)
return if (a.component1() is Unit) "OK" else "Fail ${a.component1()}"
}