JS: prohibit native (external) extension properties and functions. See KT-13896
This commit is contained in:
Vendored
-12
@@ -7,12 +7,6 @@ external class A {
|
||||
@nativeInvoke
|
||||
fun invoke(a: String): Int = 0
|
||||
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeInvoke
|
||||
fun Int.ext()<!> = 1
|
||||
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeInvoke
|
||||
fun Int.invoke(a: String, b: Int)<!> = "OK"
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
|
||||
val foo = 0
|
||||
|
||||
@@ -26,12 +20,6 @@ external class A {
|
||||
@nativeInvoke
|
||||
fun invoke(a: String): Int = 0
|
||||
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeInvoke
|
||||
fun Int.ext()<!> = 1
|
||||
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeInvoke
|
||||
fun Int.invoke(a: String, b: Int)<!> = "OK"
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
|
||||
val foo = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user