[FIR JS] Prepare the test data for FIR
This commit is contained in:
committed by
Space Team
parent
0e38d0ebd2
commit
73c89a5d9d
+5
@@ -0,0 +1,5 @@
|
||||
external interface I
|
||||
|
||||
fun box(a: Any, b: Any): Pair<I, I?> {
|
||||
return Pair(a as I, b as? I)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
external interface I
|
||||
|
||||
fun box(a: Any, b: Any): Boolean {
|
||||
return a is I && b !is I
|
||||
}
|
||||
+21
@@ -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
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
external interface I
|
||||
|
||||
fun box() {
|
||||
println(I::class)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
external interface I
|
||||
|
||||
external interface J
|
||||
|
||||
fun box(a: Any) = when (a) {
|
||||
is I -> 0
|
||||
!is J -> 1
|
||||
else -> 2
|
||||
}
|
||||
Reference in New Issue
Block a user