JS: add restrictions to external modifier according to KT-13893

This commit is contained in:
Alexey Andreev
2016-11-25 17:52:40 +03:00
parent c0c6992ea6
commit d0ffb5bd32
26 changed files with 298 additions and 290 deletions
+1 -1
View File
@@ -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.*
+7 -7
View File
@@ -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)
+2 -2
View File
@@ -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 -1
View File
@@ -1,3 +1,3 @@
package org.junit
public external annotation class Test(val name: String = "")
public annotation class Test(val name: String = "")