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:
Alexander Udalov
2023-03-15 00:11:36 +01:00
committed by Space Team
parent 2cc3b542fd
commit 68b94b07b8
17 changed files with 43 additions and 45 deletions
@@ -1,4 +1,4 @@
open enum class Test0 : Enum<Test0> {
enum class Test0 : Enum<Test0> {
private constructor(x: Int) /* primary */ {
super/*Enum*/<Test0>()
/* <init>() */
@@ -24,7 +24,7 @@ open enum class Test0 : Enum<Test0> {
}
open enum class Test1 : Enum<Test1> {
enum class Test1 : Enum<Test1> {
private constructor(x: Int) /* primary */ {
super/*Enum*/<Test1>()
/* <init>() */