diff --git a/core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt b/core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt index 974961ac478..9630ee912a9 100644 --- a/core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt +++ b/core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt @@ -22,17 +22,27 @@ package kotlin.jvm * * Example: * + * ```java * class MyList extends AbstractList { ... } + * ``` * - * Methods defined in MyList use T as platform, i.e. it's possible to perform unsafe operation in Kotlin: + * Methods defined in `MyList` use `T` as platform, i.e. it's possible to perform unsafe operation in Kotlin: + * + * ```kotlin * MyList().add(null) // compiles + * ``` * - * @PurelyImplements("kotlin.MutableList") + * ```java + * @PurelyImplements("kotlin.collections.MutableList") * class MyPureList extends AbstractList { ... } + * ``` * - * Methods defined in MyPureList overriding methods in MutableList use T as non-platform types: + * Methods defined in `MyPureList` overriding methods in `MutableList` use `T` as non-platform types: + * + * ```kotlin * MyList().add(null) // Error * MyList().add(null) // Ok + * ``` */ @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) diff --git a/libraries/build-docs.xml b/libraries/build-docs.xml index 31f6d09ce21..938f1007d0e 100644 --- a/libraries/build-docs.xml +++ b/libraries/build-docs.xml @@ -26,7 +26,7 @@ -