Files
kotlin/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt
2017-01-24 20:14:31 +03:00

29 lines
686 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
external class A {
@nativeInvoke
fun foo() {definedExternally}
@nativeInvoke
fun invoke(a: String): Int = definedExternally
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
val foo: Int = definedExternally
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
object Obj1 {}
companion object {
@nativeInvoke
fun foo() { definedExternally }
@nativeInvoke
fun invoke(a: String): Int = definedExternally
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
val foo: Int = definedExternally
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
object Obj2 {}
}
}