JS frontend: allow to omit body for native functions and initializer for native properties. Additionally suppress UNUSED_PARAM for new nativeX annotations too.

This commit is contained in:
Zalim Bashorov
2014-12-26 19:10:12 +03:00
parent 41dff74037
commit 9869ae10e5
25 changed files with 616 additions and 43 deletions
@@ -0,0 +1,71 @@
native
val baz: Int
native
val boo: Int = noImpl
native
val Int.baz: Int
native
fun foo()
native
fun bar() {}
native
fun String.foo(): Int
native
fun String.bar(): Int = noImpl
native
trait T {
val baz: Int
fun foo()
fun bar() {}
class object {
val baz: Int
val boo: Int = noImpl
fun foo()
fun bar(): String = noImpl
}
}
native
class C {
val baz: Int
val boo: Int = noImpl
fun foo()
fun bar() {}
class object {
val baz: Int
val boo: Int = noImpl
fun foo()
fun bar(): String = noImpl
}
}
native
object O {
val baz: Int
val boo: Int = noImpl
fun foo(s: String): String
fun bar(s: String): String = noImpl
}
fun test() {
[native]
class Local {
val baz: Int
val boo: Int = noImpl
fun foo()
fun bar() {}
}
}