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
@@ -16,7 +16,7 @@ enum class TestFinalEnum1 : Enum<TestFinalEnum1> {
|
||||
|
||||
}
|
||||
|
||||
open enum class TestFinalEnum2 : Enum<TestFinalEnum2> {
|
||||
enum class TestFinalEnum2 : Enum<TestFinalEnum2> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<TestFinalEnum2>()
|
||||
/* <init>() */
|
||||
@@ -184,3 +184,4 @@ abstract enum class TestAbstractEnum2 : IFoo, Enum<TestAbstractEnum2> {
|
||||
get(): EnumEntries<TestAbstractEnum2> /* Synthetic body for ENUM_ENTRIES */
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user