mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
13 lines
291 B
Kotlin
Vendored
13 lines
291 B
Kotlin
Vendored
data class A<T>(val x: T)
|
|
|
|
fun box(): String {
|
|
val a = A(42)
|
|
if (a.component1() != 42) return "Fail a: ${a.component1()}"
|
|
|
|
val b = A(239.toLong())
|
|
if (b.component1() != 239.toLong()) return "Fail b: ${b.component1()}"
|
|
|
|
val c = A("OK")
|
|
return c.component1()
|
|
}
|