Files
kotlin-fork/compiler/testData/diagnostics/tests/enum/enumImplementingTrait.fir.kt
T
Brian Norman 8091aebbc7 [FIR] Create checker for simple enum entries with missing overrides
Complex enum entries (those with bodies) with missing overrides
are covered by an existing checker that checks all types of classes. But
simple enum entries (those without bodies) were not covered and require
a separate checker for missing overrides.

#KT-58637 Fixed
2023-05-29 16:34:44 +00:00

22 lines
373 B
Kotlin
Vendored

interface T1 {
fun foo()
}
enum class EnumImplementingTraitWithFun: T1 {
E1 {
override fun foo() {}
},
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED_BY_ENUM_ENTRY!>E2<!>
}
interface T2 {
val bar: Int
}
enum class EnumImplementingTraitWithVal: T2 {
E1 {
override val bar = 1
},
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED_BY_ENUM_ENTRY!>E2<!>
}