KT-29340 Provide effective modality for enum class in IR

* if enum class has abstract members, then it is ABSTRACT
* otherwise, if enum class has entries with members, then it is OPEN
* otherwise, it is FINAL.
This commit is contained in:
Dmitry Petrov
2019-01-21 12:53:13 +03:00
parent efdb4e1d5d
commit 360bfcaf6a
16 changed files with 776 additions and 39 deletions
@@ -27,7 +27,7 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
overridden:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public flags: superTypes:[kotlin.Enum<TestEnum>]
CLASS ENUM_CLASS name:TestEnum modality:OPEN visibility:public flags: superTypes:[kotlin.Enum<TestEnum>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:TestEnum flags:
CONSTRUCTOR visibility:private <> () returnType:TestEnum flags:primary
BLOCK_BODY