Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt
T
2023-01-09 08:57:08 +00:00

30 lines
703 B
Kotlin
Vendored

// FIR_IDENTICAL
// !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 {}
}
}