JS frontend tests: add test cases with declare member extension functions.

This commit is contained in:
Zalim Bashorov
2014-12-01 16:19:34 +03:00
parent 990415b69f
commit 4c3073d03e
30 changed files with 336 additions and 7 deletions
@@ -8,11 +8,17 @@ 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"
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeInvoke
val foo<!> = 0
nativeInvoke
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>object Obj<!> {}
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>object Obj1<!> {}
class object {
nativeInvoke
@@ -20,5 +26,17 @@ 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"
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeInvoke
val foo<!> = 0
nativeInvoke
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>object Obj2<!> {}
}
}