JS: prohibit native (external) extension properties and functions. See KT-13896

This commit is contained in:
Alexey Andreev
2016-11-28 11:38:29 +03:00
parent cf25e17209
commit 3882bf7564
36 changed files with 48 additions and 346 deletions
@@ -39,15 +39,6 @@ external class B {
}
external class C {
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get(a: String): Int?<!> = 1
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get2(a: Number): String?<!> = "OK"
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get3(a: Int): String?<!> = "OK"
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>@nativeGetter
fun get(): Any?<!> = null
@@ -63,15 +54,4 @@ external class C {
@nativeGetter
fun baz(<!NATIVE_INDEXER_CAN_NOT_HAVE_DEFAULT_ARGUMENTS!>a: String = "foo"<!>): Int? = 0
companion object {
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get(a: String): Int?<!> = 1
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get2(a: Number): String?<!> = "OK"
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get3(a: Int): String?<!> = "OK"
}
}