68b94b07b8
Use the same condition as in the already existing `createIrEnumEntry` function (and as in psi2ir): enum class should be final unless there's an enum entry with any declaration other than its constructor. #KT-57216
27 lines
370 B
Kotlin
Vendored
27 lines
370 B
Kotlin
Vendored
// !LANGUAGE: +EnumEntries
|
|
// TARGET_BACKEND: JVM_IR
|
|
// FULL_JDK
|
|
// WITH_STDLIB
|
|
|
|
enum class SimpleEnum {
|
|
A, B, C
|
|
}
|
|
|
|
enum class WithConstructor(val x: String) {
|
|
A("1"), B("2"), C("3")
|
|
}
|
|
|
|
enum class WithEntryClass {
|
|
A {
|
|
override fun foo() {}
|
|
}
|
|
;
|
|
abstract fun foo()
|
|
}
|
|
|
|
annotation class Ann
|
|
|
|
enum class WithAnnotations {
|
|
@Ann A, @Ann B
|
|
}
|