Inheritance of Kotlin sealed interface/class from Java
Reports attempts to inherit from Kotlin sealed interfaces or classes in Java code.
Example:
// 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: NotANumber.java
public class NotANumber extends MathExpression {
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Kotlin, @snapshot@ |
Last modified: 13 July 2023