[FIR][checkers] Respect ClassKind.INTERFACE in FirRegularClass.canHaveAbstractDeclaration

A Kotlin interface can have abstract members regardless of its modality. However, this invariant was previously ignored by FIR checkers. As a result, false-positive `ABSTRACT_<MEMBER>_IN_NON_ABSTRACT_CLASS` errors were being reported in explicitly non-abstract interfaces.

This commit makes a relevant FIR utility used by relevant FIR checkers aware of the aforementioned invariant.

#KT-66260 Fixed
This commit is contained in:
Stanislav Ruban
2024-03-01 14:17:47 +02:00
committed by Space Team
parent e0b83def00
commit 2de0e4b8d2
4 changed files with 3 additions and 17 deletions
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FIR_DUMP
<!REDUNDANT_MODIFIER_FOR_TARGET!>open<!> interface OpenInterface {
fun defaultModalityFuncWithoutBody()