Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
553 stars 44 forks source link

Add Suppress(EXTERNAL_DELEGATION) only where we actually need it #329

Closed Schahen closed 4 years ago

Schahen commented 4 years ago

We're adding EXTERNAL_DELEGATION suppression on a file level while actually we can add it exactly where it's needed, like we do with NESTED_CLASS_IN_EXTERNAL_INTERFACE. In other words this:

@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS", "EXTERNAL_DELEGATION")

@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
external interface MySymbol {
     companion object : MySymbolConstructor by definedExternally
}

can be just

@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")

@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE",  "EXTERNAL_DELEGATION")
external interface MySymbol {
     companion object : MySymbolConstructor by definedExternally
}
Schahen commented 4 years ago

Released in 0.5.6