[FE] Support sealed classes and interfaces from java
KT-43551 KT-41215
This commit is contained in:
committed by
TeamCityServer
parent
bdfb71b149
commit
7897bb6adb
@@ -15,12 +15,13 @@ enum class Modality {
|
||||
ABSTRACT;
|
||||
|
||||
companion object {
|
||||
|
||||
// NB: never returns SEALED
|
||||
fun convertFromFlags(abstract: Boolean, open: Boolean): Modality {
|
||||
if (abstract) return ABSTRACT
|
||||
if (open) return OPEN
|
||||
return FINAL
|
||||
fun convertFromFlags(sealed: Boolean, abstract: Boolean, open: Boolean): Modality {
|
||||
return when {
|
||||
sealed -> SEALED
|
||||
abstract -> ABSTRACT
|
||||
open -> OPEN
|
||||
else -> FINAL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user