f45d92eebc
While not beeing final solution, this is closer to what we want to have in the end. Enabling on non-JVM targets would help better testing. Enabling in JVM is now not possible yet, as some of the bugs are not fixed yet (check KT-61360 for details) ^KT-62476
50 lines
639 B
Kotlin
Vendored
50 lines
639 B
Kotlin
Vendored
// KT-64271, KT-64382
|
|
// IGNORE_BACKEND_K2: NATIVE, WASM, JS_IR, JS_IR_ES6
|
|
|
|
enum class TestFinalEnum1 {
|
|
X1
|
|
}
|
|
|
|
enum class TestFinalEnum2(val x: Int) {
|
|
X1(1)
|
|
}
|
|
|
|
enum class TestFinalEnum3 {
|
|
X1
|
|
;
|
|
|
|
fun doStuff() {}
|
|
}
|
|
|
|
enum class TestOpenEnum1 {
|
|
X1 {
|
|
override fun toString() = "X1"
|
|
}
|
|
}
|
|
|
|
enum class TestOpenEnum2 {
|
|
X1 {
|
|
override fun foo() {}
|
|
};
|
|
|
|
open fun foo() {}
|
|
}
|
|
|
|
enum class TestAbstractEnum1 {
|
|
X1 {
|
|
override fun foo() {}
|
|
};
|
|
|
|
abstract fun foo()
|
|
}
|
|
|
|
interface IFoo {
|
|
fun foo()
|
|
}
|
|
|
|
enum class TestAbstractEnum2 : IFoo {
|
|
X1 {
|
|
override fun foo() {}
|
|
}
|
|
}
|