Inspectopedia Help

Optionally expected annotation has no actual annotation

Reports optionally expected annotations without actual annotation in some platform modules.

Example:

// common code @OptionalExpectation expect annotation class JvmName(val name: String) @JvmName(name = "JvmFoo") fun foo() { } // jvm code actual annotation class JvmName(val name: String)

The inspection also reports cases when actual annotation class JvmName is omitted for non-JVM platforms (for example, Native).

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023