mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
10 lines
221 B
Kotlin
Vendored
10 lines
221 B
Kotlin
Vendored
enum class Test(val x: Int, val str: String) {
|
|
OK;
|
|
constructor(vararg xs: Int) : this(xs.size + 42, "OK")
|
|
}
|
|
|
|
fun box(): String =
|
|
if (Test.OK.x == 42)
|
|
Test.OK.str
|
|
else
|
|
"Fail" |