JS frontend: added tests for nativeInvoke, nativeGetter, nativeSetter.

This commit is contained in:
Zalim Bashorov
2014-11-25 21:30:33 +03:00
parent 99745dfa90
commit 31d4a8c226
66 changed files with 2428 additions and 7 deletions
@@ -0,0 +1,21 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo() {
[nativeGetter]
fun Int.get(a: String): Int? = 1
[nativeGetter]
fun Int.get2(a: Number): String? = "OK"
[nativeGetter]
fun Int.get3(a: Int): String? = "OK"
[nativeGetter]
fun Int.get(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: Any<!>): Int? = 1
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>[nativeGetter]
fun Int.get2(): String?<!> = "OK"
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>[nativeGetter]
fun Int.get3(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: Any<!>, b: Int, c: Any?): String?<!> = "OK"
}