[JS IR] Control an inheritance of non-external entity from external

Add a special annotation @JsExternalInheritorsOnly for marking
 external interfaces and classes. The marked interface or class
 can’t be a parent for non external interfaces, classes or objects.

^KT-57423 Fixed
This commit is contained in:
Alexander Korepanov
2023-03-21 11:45:04 +01:00
committed by Space Team
parent 6e7b078873
commit 4813b659ab
26 changed files with 677 additions and 1 deletions
+8
View File
@@ -250,6 +250,14 @@ public final annotation class JsExport : kotlin.Annotation {
}
}
@kotlin.ExperimentalStdlibApi
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS})
@kotlin.SinceKotlin(version = "1.9")
public final annotation class JsExternalInheritorsOnly : kotlin.Annotation {
public constructor JsExternalInheritorsOnly()
}
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.FILE})
public final annotation class JsModule : kotlin.Annotation {
+8
View File
@@ -249,6 +249,14 @@ public final annotation class JsExport : kotlin.Annotation {
}
}
@kotlin.ExperimentalStdlibApi
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS})
@kotlin.SinceKotlin(version = "1.9")
public final annotation class JsExternalInheritorsOnly : kotlin.Annotation {
public constructor JsExternalInheritorsOnly()
}
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.FILE})
public final annotation class JsModule : kotlin.Annotation {