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
@@ -42,6 +42,15 @@ class B {
native
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
@@ -53,4 +62,16 @@ class C {
nativeGetter
fun bar(a: String): <!NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE!>Int<!> = 0
class 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"
}
}