Report error on native declaration with a body
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import kotlin.jvm.*
|
||||
|
||||
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
|
||||
|
||||
class C {
|
||||
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
|
||||
|
||||
class object {
|
||||
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
|
||||
}
|
||||
}
|
||||
|
||||
object O {
|
||||
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
class Local {
|
||||
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
|
||||
}
|
||||
|
||||
object {
|
||||
<!NATIVE_DECLARATION_CANNOT_HAVE_BODY!>native fun foo()<!> {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user