Add kotlin.external annotation and deprecate kotlin.jvm.native

This commit is contained in:
Denis Zharkov
2015-09-04 14:21:29 +03:00
parent 26f9bd7b63
commit 5471a1d18a
29 changed files with 93 additions and 79 deletions
@@ -67,7 +67,8 @@ public abstract class AnnotationCodegen {
public static final List<JvmFlagAnnotation> METHOD_FLAGS = Arrays.asList(
new JvmFlagAnnotation("kotlin.jvm.Strictfp", Opcodes.ACC_STRICT),
new JvmFlagAnnotation("kotlin.jvm.Synchronized", Opcodes.ACC_SYNCHRONIZED),
new JvmFlagAnnotation("kotlin.jvm.native", Opcodes.ACC_NATIVE)
new JvmFlagAnnotation("kotlin.jvm.native", Opcodes.ACC_NATIVE),
new JvmFlagAnnotation("kotlin.external", Opcodes.ACC_NATIVE)
);
private static final AnnotationVisitor NO_ANNOTATION_VISITOR = new AnnotationVisitor(Opcodes.ASM5) {};
@@ -34,11 +34,15 @@ import org.jetbrains.kotlin.resolve.diagnostics.SuppressDiagnosticsByAnnotations
import org.jetbrains.kotlin.resolve.diagnostics.FUNCTION_NO_BODY_ERRORS
private val NATIVE_ANNOTATION_CLASS_NAME = FqName("kotlin.jvm.native")
private val EXTERNAL_ANNOTATION_CLASS_NAME = FqName("kotlin.external")
public fun DeclarationDescriptor.hasNativeAnnotation(): Boolean {
return getAnnotations().findAnnotation(NATIVE_ANNOTATION_CLASS_NAME) != null
return getAnnotations().findAnnotation(EXTERNAL_ANNOTATION_CLASS_NAME) != null
|| annotations.findAnnotation(NATIVE_ANNOTATION_CLASS_NAME) != null
}
public class SuppressNoBodyErrorsForExternalDeclarations : SuppressDiagnosticsByAnnotations(FUNCTION_NO_BODY_ERRORS, EXTERNAL_ANNOTATION_CLASS_NAME)
public class SuppressNoBodyErrorsForNativeDeclarations : SuppressDiagnosticsByAnnotations(FUNCTION_NO_BODY_ERRORS, NATIVE_ANNOTATION_CLASS_NAME)
public class NativeFunChecker : DeclarationChecker {
@@ -51,19 +55,19 @@ public class NativeFunChecker : DeclarationChecker {
if (!descriptor.hasNativeAnnotation()) return
if (DescriptorUtils.isTrait(descriptor.getContainingDeclaration())) {
diagnosticHolder.report(ErrorsJvm.NATIVE_DECLARATION_IN_TRAIT.on(declaration))
diagnosticHolder.report(ErrorsJvm.EXTERNAL_DECLARATION_IN_TRAIT.on(declaration))
}
else if (descriptor is CallableMemberDescriptor &&
descriptor.getModality() == Modality.ABSTRACT) {
diagnosticHolder.report(ErrorsJvm.NATIVE_DECLARATION_CANNOT_BE_ABSTRACT.on(declaration))
diagnosticHolder.report(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT.on(declaration))
}
if (descriptor !is ConstructorDescriptor && declaration is JetDeclarationWithBody && declaration.hasBody()) {
diagnosticHolder.report(ErrorsJvm.NATIVE_DECLARATION_CANNOT_HAVE_BODY.on(declaration))
diagnosticHolder.report(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_HAVE_BODY.on(declaration))
}
if (descriptor.hasInlineAnnotation()) {
diagnosticHolder.report(ErrorsJvm.NATIVE_DECLARATION_CANNOT_BE_INLINED.on(declaration))
diagnosticHolder.report(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_BE_INLINED.on(declaration))
}
}
@@ -54,10 +54,10 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension {
MAP.put(ErrorsJvm.OVERLOADS_PRIVATE, "''jvmOverloads'' annotation has no effect on private and local declarations");
MAP.put(ErrorsJvm.INAPPLICABLE_JVM_NAME, "''jvmName'' annotation is not applicable to this declaration");
MAP.put(ErrorsJvm.ILLEGAL_JVM_NAME, "Illegal JVM name: ''{0}''", STRING);
MAP.put(ErrorsJvm.NATIVE_DECLARATION_CANNOT_BE_ABSTRACT, "Native declaration can not be abstract");
MAP.put(ErrorsJvm.NATIVE_DECLARATION_CANNOT_HAVE_BODY, "Native declaration can not have a body");
MAP.put(ErrorsJvm.NATIVE_DECLARATION_IN_TRAIT, "Members of interfaces can not be native");
MAP.put(ErrorsJvm.NATIVE_DECLARATION_CANNOT_BE_INLINED, "Members of interfaces can not be inlined");
MAP.put(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT, "External declaration can not be abstract");
MAP.put(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_HAVE_BODY, "External declaration can not have a body");
MAP.put(ErrorsJvm.EXTERNAL_DECLARATION_IN_TRAIT, "Members of interfaces can not be external");
MAP.put(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_BE_INLINED, "Members of interfaces can not be external");
MAP.put(ErrorsJvm.POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION, "Only named arguments are available for Java annotations");
MAP.put(ErrorsJvm.DEPRECATED_ANNOTATION_METHOD_CALL, "Annotation methods are deprecated. Use property instead");
@@ -50,10 +50,10 @@ public interface ErrorsJvm {
DiagnosticFactory0<JetDeclaration> OVERLOADS_ABSTRACT = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> OVERLOADS_PRIVATE = DiagnosticFactory0.create(WARNING, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> NATIVE_DECLARATION_CANNOT_BE_ABSTRACT = DiagnosticFactory0.create(ERROR, ABSTRACT_MODIFIER);
DiagnosticFactory0<JetDeclaration> NATIVE_DECLARATION_CANNOT_HAVE_BODY = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> NATIVE_DECLARATION_IN_TRAIT = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> NATIVE_DECLARATION_CANNOT_BE_INLINED = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT = DiagnosticFactory0.create(ERROR, ABSTRACT_MODIFIER);
DiagnosticFactory0<JetDeclaration> EXTERNAL_DECLARATION_CANNOT_HAVE_BODY = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> EXTERNAL_DECLARATION_IN_TRAIT = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetDeclaration> EXTERNAL_DECLARATION_CANNOT_BE_INLINED = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0<JetExpression> POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0<JetElement> DEPRECATED_ANNOTATION_METHOD_CALL = DiagnosticFactory0.create(WARNING);
@@ -4,12 +4,12 @@ import kotlin.jvm.*
import kotlin.platform.*
object ObjWithNative {
native fun foo(x: Int = 1): Double
external fun foo(x: Int = 1): Double
platformStatic native fun bar(l: Long, s: String = ""): Double
platformStatic external fun bar(l: Long, s: String = ""): Double
}
native fun topLevel(x: Int = 1): Double
external fun topLevel(x: Int = 1): Double
fun box(): String {
var d = 0.0
@@ -1,27 +1,27 @@
class C {
companion object {
val defaultGetter: Int = 1
@native get
@external get
var defaultSetter: Int = 1
@native get
@native set
@external get
@external set
}
val defaultGetter: Int = 1
@native get
@external get
var defaultSetter: Int = 1
@native get
@native set
@external get
@external set
}
val defaultGetter: Int = 1
@native get
@external get
var defaultSetter: Int = 1
@native get
@native set
@external get
@external set
fun check(body: () -> Unit, signature: String): String? {
try {
@@ -3,7 +3,7 @@ import kotlin.platform.*
class C {
companion object {
private platformStatic native fun foo()
private platformStatic external fun foo()
}
fun bar() {
@@ -3,7 +3,7 @@ package foo
import kotlin.jvm.*
class WithNative {
native fun foo()
external fun foo()
}
fun box(): String {
@@ -5,12 +5,12 @@ import kotlin.platform.*
class WithNative {
companion object {
platformStatic native fun bar(l: Long, s: String): Double
platformStatic external fun bar(l: Long, s: String): Double
}
}
object ObjWithNative {
platformStatic native fun bar(l: Long, s: String): Double
platformStatic external fun bar(l: Long, s: String): Double
}
fun box(): String {
@@ -3,7 +3,7 @@ package foo
import kotlin.jvm.*
import kotlin.platform.*
native fun bar(l: Long, s: String): Double
external fun bar(l: Long, s: String): Double
fun box(): String {
var d = 0.0
@@ -1,11 +1,11 @@
import kotlin.jvm.*
abstract class C {
<!NATIVE_DECLARATION_CANNOT_BE_ABSTRACT!>abstract<!> native fun foo()
<!EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT!>abstract<!> external fun foo()
}
fun test() {
abstract class Local {
<!NATIVE_DECLARATION_CANNOT_BE_ABSTRACT!>abstract<!> native fun foo()
<!EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT!>abstract<!> external fun foo()
}
}
@@ -5,7 +5,7 @@ internal fun test(): kotlin.Unit
internal abstract class C {
public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal abstract fun foo(): kotlin.Unit
kotlin.external() internal abstract fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,25 +1,25 @@
import kotlin.jvm.*
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
class C {
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
companion object {
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
}
}
object O {
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
}
fun test() {
class Local {
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
}
object {
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
}
}
@@ -1,19 +1,19 @@
package
kotlin.jvm.native() internal fun foo(): kotlin.Unit
kotlin.external() internal fun foo(): kotlin.Unit
internal fun test(): kotlin.Unit
internal final class C {
public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public companion object Companion {
private constructor Companion()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -22,7 +22,7 @@ internal final class C {
internal object O {
private constructor O()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,10 +1,10 @@
class A {
<!WRONG_ANNOTATION_TARGET!>native<!> constructor() {}
<!WRONG_ANNOTATION_TARGET!>external<!> constructor() {}
inner class B {
<!WRONG_ANNOTATION_TARGET!>native<!> constructor() {}
<!WRONG_ANNOTATION_TARGET!>external<!> constructor() {}
}
<!WRONG_ANNOTATION_TARGET!>native<!> constructor(<!UNUSED_PARAMETER!>x<!>: Int)
<!WRONG_ANNOTATION_TARGET!>external<!> constructor(<!UNUSED_PARAMETER!>x<!>: Int)
}
class C <!WRONG_ANNOTATION_TARGET!>native<!> constructor()
class C <!WRONG_ANNOTATION_TARGET!>external<!> constructor()
@@ -1,14 +1,14 @@
package
internal final class A {
kotlin.jvm.native() public constructor A()
kotlin.jvm.native() public constructor A(/*0*/ x: kotlin.Int)
kotlin.external() public constructor A()
kotlin.external() public constructor A(/*0*/ x: kotlin.Int)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal final inner class B {
kotlin.jvm.native() public constructor B()
kotlin.external() public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
@@ -16,7 +16,7 @@ internal final class A {
}
internal final class C {
kotlin.jvm.native() public constructor C()
kotlin.external() public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
@@ -1,11 +1,11 @@
import kotlin.jvm.*
abstract class C {
<!NATIVE_DECLARATION_CANNOT_BE_INLINED, NOTHING_TO_INLINE!>inline native fun foo()<!>
<!EXTERNAL_DECLARATION_CANNOT_BE_INLINED, NOTHING_TO_INLINE!>inline external fun foo()<!>
}
fun test() {
abstract class Local {
<!NATIVE_DECLARATION_CANNOT_BE_INLINED, NOTHING_TO_INLINE!>inline native fun foo()<!>
<!EXTERNAL_DECLARATION_CANNOT_BE_INLINED, NOTHING_TO_INLINE!>inline external fun foo()<!>
}
}
@@ -5,7 +5,7 @@ internal fun test(): kotlin.Unit
internal abstract class C {
public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.inline() kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.inline() kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,25 +1,25 @@
import kotlin.jvm.*
native fun foo()
external fun foo()
class C {
native fun foo()
external fun foo()
companion object {
native fun foo()
external fun foo()
}
}
object O {
native fun foo()
external fun foo()
}
fun test() {
class Local {
native fun foo()
external fun foo()
}
object {
native fun foo()
external fun foo()
}
}
@@ -1,19 +1,19 @@
package
kotlin.jvm.native() internal fun foo(): kotlin.Unit
kotlin.external() internal fun foo(): kotlin.Unit
internal fun test(): kotlin.Unit
internal final class C {
public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public companion object Companion {
private constructor Companion()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -22,7 +22,7 @@ internal final class C {
internal object O {
private constructor O()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -5,5 +5,5 @@ interface Base {
}
class Derived : Base {
override native fun foo()
override external fun foo()
}
@@ -10,7 +10,7 @@ internal interface Base {
internal final class Derived : Base {
public constructor Derived()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal open override /*1*/ fun foo(): kotlin.Unit
kotlin.external() internal open override /*1*/ fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,4 +1,4 @@
import kotlin.jvm.*
native fun <<!REIFIED_TYPE_PARAMETER_NO_INLINE!>reified<!> T> foo()
<!NATIVE_DECLARATION_CANNOT_BE_INLINED!>inline native fun <reified T> bar()<!>
external fun <<!REIFIED_TYPE_PARAMETER_NO_INLINE!>reified<!> T> foo()
<!EXTERNAL_DECLARATION_CANNOT_BE_INLINED!>inline external fun <reified T> bar()<!>
@@ -1,4 +1,4 @@
package
kotlin.inline() kotlin.jvm.native() internal fun </*0*/ reified T> bar(): kotlin.Unit
kotlin.jvm.native() internal fun </*0*/ reified T> foo(): kotlin.Unit
kotlin.inline() kotlin.external() internal fun </*0*/ reified T> bar(): kotlin.Unit
kotlin.external() internal fun </*0*/ reified T> foo(): kotlin.Unit
@@ -1,11 +1,11 @@
import kotlin.jvm.*
interface Tr {
<!NATIVE_DECLARATION_IN_TRAIT!>native fun foo()<!>
<!NATIVE_DECLARATION_IN_TRAIT, NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun bar()<!> {}
<!EXTERNAL_DECLARATION_IN_TRAIT!>external fun foo()<!>
<!EXTERNAL_DECLARATION_IN_TRAIT, EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun bar()<!> {}
companion object {
native fun foo()
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun bar()<!> {}
external fun foo()
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun bar()<!> {}
}
}
@@ -1,17 +1,17 @@
package
internal interface Tr {
kotlin.jvm.native() internal open fun bar(): kotlin.Unit
kotlin.external() internal open fun bar(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal abstract fun foo(): kotlin.Unit
kotlin.external() internal abstract fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public companion object Companion {
private constructor Companion()
kotlin.jvm.native() internal final fun bar(): kotlin.Unit
kotlin.external() internal final fun bar(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
kotlin.jvm.native() internal final fun foo(): kotlin.Unit
kotlin.external() internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
+7
View File
@@ -89,3 +89,10 @@ public annotation(retention = SOURCE) class tailrec
target(FUNCTION, PROPERTY, CONSTRUCTOR)
annotation(retention = BINARY, mustBeDocumented = true)
public class HiddenDeclaration
/**
* Marks annotated function as `external`, meaning that it's not implemented
* in Kotlin but rather in a different language (for example, in C/C++ using JNI or JavaScript).
*/
target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class external
@@ -4,6 +4,7 @@
<extensions defaultExtensionNs="org.jetbrains.kotlin">
<defaultErrorMessages implementation="org.jetbrains.kotlin.resolve.jvm.diagnostics.DefaultErrorMessagesJvm"/>
<suppressStringProvider implementation="org.jetbrains.kotlin.load.kotlin.nativeDeclarations.SuppressNoBodyErrorsForExternalDeclarations"/>
<suppressStringProvider implementation="org.jetbrains.kotlin.load.kotlin.nativeDeclarations.SuppressNoBodyErrorsForNativeDeclarations"/>
<classBuilderInterceptorExtension implementation="org.jetbrains.kotlin.annotation.AnnotationCollectorExtension"/>
@@ -53,4 +53,5 @@ public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = tru
* in Java but rather in a different language (for example, in C/C++ using JNI).
*/
target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
@deprecated("Use kotlin.external instead", ReplaceWith("kotlin.external"))
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class native