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,25 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo() {
external class A {
@nativeInvoke
fun foo() {}
@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"
val anonymous = object {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
}
}
}
@@ -1,3 +0,0 @@
package
public fun foo(): kotlin.Unit