OptionalExpectation

Common
JVM
JS
Native
1.0
@Target([AnnotationTarget.ANNOTATION_CLASS]) @ExperimentalMultiplatform annotation class OptionalExpectation
(source)

Marks an expected annotation class that it isn't required to have actual counterparts in all platforms.

This annotation is only applicable to expect annotation classes in multi-platform projects and marks that class as "optional". Optional expected class is allowed to have no corresponding actual class on the platform. Optional annotations can only be used to annotate something, not as types in signatures. If an optional annotation has no corresponding actual class on a platform, the annotation entries where it's used are simply erased when compiling code on that platform.

Note: this annotation is experimental, see ExperimentalMultiplatform on how to opt-in for it.

Constructors

Common
JVM
JS
Native
1.0

<init>

Marks an expected annotation class that it isn't required to have actual counterparts in all platforms.

OptionalExpectation()