Move kotlin.native.Throws to common stdlib and rename to NativeThrows. Move native concurrent annotations to subpackage
diff --git a/libraries/stdlib/common/src/kotlin/NativeAnnotations.H.kt b/libraries/stdlib/common/src/kotlin/NativeAnnotations.H.kt new file mode 100644 index 0000000..a19fd68 --- /dev/null +++ b/libraries/stdlib/common/src/kotlin/NativeAnnotations.H.kt
@@ -0,0 +1,24 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package kotlin.native + +import kotlin.reflect.KClass + +/** + * This annotation indicates what exceptions should be declared by a function when compiled to a platform method. + * + * When compiling to Objective-C/Swift framework, methods having or inheriting this annotation are represented as + * `NSError*`-producing methods in Objective-C and as `throws` methods in Swift. + * When such a method called through framework API throws an exception, it is either propagated as + * `NSError` or considered unhandled (if exception `is` [kotlin.Error] or [kotlin.RuntimeException]). + * In any case exception is not checked to be instance of one of the [exceptionClasses]. + * + * @property exceptionClasses the list of checked exception classes that may be thrown by the function. + */ +@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR) +@Retention(AnnotationRetention.SOURCE) +@OptionalExpectation +public expect annotation class NativeThrows(vararg val exceptionClasses: KClass<out Throwable>) \ No newline at end of file
diff --git a/libraries/stdlib/common/src/kotlin/NativeAnnotationsH.kt b/libraries/stdlib/common/src/kotlin/native/NativeAnnotationsH.kt similarity index 100% rename from libraries/stdlib/common/src/kotlin/NativeAnnotationsH.kt rename to libraries/stdlib/common/src/kotlin/native/NativeAnnotationsH.kt