[FIR JS] Prepare the test data for FIR

This commit is contained in:
Nikolay Lunyak
2023-01-03 13:24:08 +02:00
committed by Space Team
parent 0e38d0ebd2
commit 73c89a5d9d
181 changed files with 3790 additions and 10 deletions
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
fun foo() {
@@ -0,0 +1,25 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION, -DEPRECATION
fun foo() {
class A {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
@nativeInvoke
fun Int.ext() = 1
@nativeInvoke
fun Int.invoke(a: String, b: Int) = "OK"
val anonymous = object {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
}
}
}
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NON_TOPLEVEL_CLASS_DECLARATION, -DEPRECATION
fun foo() {
@nativeInvoke
fun toplevelFun() {}
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
val toplevelVal = 0
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
class Foo {}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
external class A {
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
external class A {
@@ -0,0 +1,43 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION, -DEPRECATION
class A {
class B {
class C {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
@nativeInvoke
fun Int.ext() = 1
@nativeInvoke
fun Int.invoke(a: String, b: Int) = "OK"
}
object obj {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
}
companion object {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
}
val anonymous = object {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
}
}
}
@@ -0,0 +1,35 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
class A {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
@nativeInvoke
fun Int.ext() = 1
@nativeInvoke
fun Int.invoke(a: String, b: Int) = "OK"
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
val baz = 0
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
object Obj {}
companion object {
@nativeInvoke
fun foo() {}
@nativeInvoke
fun invoke(a: String): Int = 0
@nativeInvoke
fun Int.ext() = 1
@nativeInvoke
fun Int.invoke(a: String, b: Int) = "OK"
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
@nativeInvoke
@@ -0,0 +1,10 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
@nativeInvoke
fun toplevelFun() {}
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
val toplevelVal = 0
<!WRONG_ANNOTATION_TARGET!>@nativeInvoke<!>
class Foo {}