Java
Inheritance of Kotlin sealed interface/class from Java
Error
New
Last modified: 03 December 2024Reports 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 {
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
KotlinSealedInheritorsInJava
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Kotlin, 243.23126-IJ |
Thanks for your feedback!
Was this page helpful?