Files
kotlin/compiler/testData/codegen/box/defaultArguments/constructor/enum.kt
2018-06-09 19:15:38 +03:00

13 lines
188 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
enum class A(val a: Int = 1) {
FIRST(),
SECOND(2)
}
fun box(): String {
if (A.FIRST.a == 1 && A.SECOND.a == 2) {
return "OK"
}
return "fail"
}