Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

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.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.