Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 564 Bytes

OptionalAbstractKeyword.md

File metadata and controls

31 lines (20 loc) · 564 Bytes

Pattern: Unnecessary abstract modifier

Issue: -

Description

abstract modifiers are unnecessary and can be removed.

Example of incorrect code:

abstract interface Foo { // abstract keyword not needed

    abstract fun x() // abstract keyword not needed
    abstract var y: Int // abstract keyword not needed
}

Example of correct code:

interface Foo {

    fun x()
    var y: Int
}

Further Reading