[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
@@ -0,0 +1,5 @@
external interface I
fun box(a: Any, b: Any): Pair<I, I?> {
return Pair(a as I, b as? I)
}
@@ -0,0 +1,5 @@
external interface I
fun box(a: Any, b: Any): Boolean {
return a is I && b !is I
}
@@ -0,0 +1,21 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
inline fun <reified T> foo(x: T) {
println(x)
}
external interface I
external class C : I
operator inline fun <reified T> C.plus(other: T) = this
fun bar() {
foo(C())
val c: I = C()
foo(c)
foo<I>(C())
C() + c
}
@@ -0,0 +1,5 @@
external interface I
fun box() {
println(I::class)
}
@@ -0,0 +1,9 @@
external interface I
external interface J
fun box(a: Any) = when (a) {
is I -> 0
!is J -> 1
else -> 2
}