[FIR] Add JVM diagnostics about external declaration

This commit is contained in:
Ivan Kochurkin
2021-08-28 00:36:57 +03:00
committed by TeamCityServer
parent 4907bc296f
commit 816e8f487c
19 changed files with 138 additions and 76 deletions
@@ -1,11 +0,0 @@
import kotlin.jvm.*
abstract class C {
abstract external fun foo()
}
fun test() {
abstract class Local {
abstract external fun foo()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
import kotlin.jvm.*
abstract class C {
@@ -1,25 +0,0 @@
import kotlin.jvm.*
external fun foo() {}
class C {
external fun foo() {}
companion object {
external fun foo() {}
}
}
object O {
external fun foo() {}
}
fun test() {
class Local {
external fun foo() {}
}
object {
external fun foo() {}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
import kotlin.jvm.*
<!EXTERNAL_DECLARATION_CANNOT_HAVE_BODY!>external fun foo()<!> {}
@@ -1,11 +0,0 @@
import kotlin.jvm.*
abstract class C {
<!NOTHING_TO_INLINE!>inline<!> external fun foo()
}
fun test() {
abstract class Local {
<!NOTHING_TO_INLINE!>inline<!> external fun foo()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
import kotlin.jvm.*
abstract class C {
@@ -1,4 +0,0 @@
import kotlin.jvm.*
external fun <<!REIFIED_TYPE_PARAMETER_NO_INLINE!>reified<!> T> foo()
inline external fun <reified T> bar()
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
import kotlin.jvm.*
external fun <<!REIFIED_TYPE_PARAMETER_NO_INLINE!>reified<!> T> foo()
@@ -1,11 +0,0 @@
import kotlin.jvm.*
interface Tr {
external fun foo()
external fun bar() {}
companion object {
external fun foo()
external fun bar() {}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
import kotlin.jvm.*
interface Tr {