Fir2Ir: more precise calculation of enum class modality
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
This commit is contained in:
committed by
Space Team
parent
2cc3b542fd
commit
68b94b07b8
-2
@@ -1,6 +1,4 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57216 K2: non-trivial enum declaration does not have ACC_FINAL in the bytecode
|
||||
|
||||
enum class Test {
|
||||
@Deprecated("") ENTRY1,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57216 K2: non-trivial enum declaration does not have ACC_FINAL in the bytecode
|
||||
|
||||
enum class SimpleEnum {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
// FULL_JDK
|
||||
// WITH_STDLIB
|
||||
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57216 K2: non-trivial enum declaration does not have ACC_FINAL in the bytecode
|
||||
|
||||
enum class SimpleEnum {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
Vendored
-2
@@ -1,6 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57216 K2: non-trivial enum declaration does not have ACC_FINAL in the bytecode
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user