JS: add restrictions to external modifier according to KT-13893
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:Suppress("WRONG_MODIFIER_TARGET")
|
||||
package kotlin.js
|
||||
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@@ -20,28 +20,28 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, VALUE_PARAMETER, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
@Deprecated("Use `external` modifier instead")
|
||||
public external annotation class native(@Deprecated public val name: String = "")
|
||||
public annotation class native(@Deprecated public val name: String = "")
|
||||
|
||||
@Target(FUNCTION)
|
||||
@Deprecated("Use inline extension function with body using dynamic")
|
||||
public external annotation class nativeGetter
|
||||
public annotation class nativeGetter
|
||||
|
||||
@Target(FUNCTION)
|
||||
@Deprecated("Use inline extension function with body using dynamic")
|
||||
public external annotation class nativeSetter
|
||||
public annotation class nativeSetter
|
||||
|
||||
@Target(FUNCTION)
|
||||
@Deprecated("Use inline extension function with body using dynamic")
|
||||
public external annotation class nativeInvoke
|
||||
public annotation class nativeInvoke
|
||||
|
||||
@Target(CLASS, FUNCTION, PROPERTY)
|
||||
internal external annotation class library(public val name: String = "")
|
||||
internal annotation class library(public val name: String = "")
|
||||
|
||||
@Target(PROPERTY)
|
||||
public external annotation class enumerable()
|
||||
public annotation class enumerable()
|
||||
|
||||
@Target(CLASS)
|
||||
internal external annotation class marker
|
||||
internal annotation class marker
|
||||
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
|
||||
@@ -29,10 +29,10 @@ package kotlin
|
||||
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public external annotation class Volatile
|
||||
public annotation class Volatile
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public external annotation class Synchronized
|
||||
public annotation class Synchronized
|
||||
|
||||
public external inline fun <R> synchronized(lock: Any, crossinline block: () -> R): R = block()
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package org.junit
|
||||
|
||||
public external annotation class Test(val name: String = "")
|
||||
public annotation class Test(val name: String = "")
|
||||
|
||||
Reference in New Issue
Block a user