Inspectopedia Help

Inheritance of Kotlin sealed interface/class from Java

Reports attempts to inherit from Kotlin sealed interfaces or classes in Java code.


// Kotlin file: MathExpression.kt sealed class MathExpression data class Const(val number: Double) : MathExpression() data class Sum(val e1: MathExpression, val e2: MathExpression) : MathExpression()
// Java file: public class NotANumber extends MathExpression { }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Kotlin, 241.16690-IJ

Last modified: 29 April 2024