[test] Run irText tests against K1 frontend for JS
This commit is contained in:
committed by
Space Team
parent
502a0b7e10
commit
27ccef868a
@@ -2,6 +2,8 @@
|
||||
// See KT-44312
|
||||
// IGNORE_BACKEND_K2: ANY
|
||||
// ^ TODO decide if we want to fix KT-42020 for FIR as well
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
open class Base<T> {
|
||||
fun foo(x: T) {}
|
||||
@@ -66,4 +68,4 @@ open class Outer<T> {
|
||||
|
||||
class OuterDerived : Outer<String>() {
|
||||
inner class InnerDerived : Inner()
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class C(x: Int, val y: Int, var z: Int = 1) {
|
||||
constructor() : this(0, 0, 0) {}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class TestClass
|
||||
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_KLIB_TEST
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
class A : Cloneable
|
||||
|
||||
interface I : Cloneable
|
||||
@@ -8,4 +11,4 @@ class C : I
|
||||
|
||||
class OC : I {
|
||||
override fun clone(): OC = OC()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
data class Test1(val x: Int, val y: String, val z: Any)
|
||||
|
||||
data class Test2(val x: Any?)
|
||||
|
||||
data class Test3(val d: Double, val dn: Double?, val f: Float, val df: Float?)
|
||||
data class Test3(val d: Double, val dn: Double?, val f: Float, val df: Float?)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_KLIB_TEST
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
sealed class A : CharSequence {
|
||||
data class B(val c: CharSequence) : A(), CharSequence by c
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// SKIP_KT_DUMP
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
data class A(val x: Int) {
|
||||
val String.x: String get() = this
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// This test emulates 'allopen' compiler plugin.
|
||||
|
||||
@Suppress("INCOMPATIBLE_MODIFIERS")
|
||||
open data class ValidatedProperties(
|
||||
open val test1: String,
|
||||
open val test2: String
|
||||
)
|
||||
)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class TestEnum1 {
|
||||
TEST1, TEST2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
enum class TestFinalEnum1 {
|
||||
X1
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
enum class A {
|
||||
X("asd"),
|
||||
Y() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class Test0(val x: Int) {
|
||||
ZERO;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class Test1 {
|
||||
init {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
class TestInitValInLambdaCalledOnce {
|
||||
val x: Int
|
||||
init {
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
inline class Test(val x: Int)
|
||||
inline class Test(val x: Int)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface IFoo {
|
||||
fun foo()
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
annotation class TestAnn(val x: String)
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
annotation class Ann
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
annotation class TestAnn(val x: String)
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class En { A, B, C, D }
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
annotation class A(val x: String)
|
||||
|
||||
|
||||
Vendored
+3
@@ -1,4 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
annotation class A1
|
||||
annotation class A2
|
||||
annotation class A3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class C {
|
||||
val test1 = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class Outer {
|
||||
val x: Int = 1
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
class Context {
|
||||
fun foo() = 1
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class O(val o: String)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class C {
|
||||
val c = 42
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class Param
|
||||
class C {
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
context(T) class A<T>
|
||||
|
||||
context(Collection<P>) class B<P>
|
||||
@@ -11,4 +14,4 @@ fun Int.foo() {
|
||||
|
||||
fun Collection<Int>.bar() {
|
||||
B<Int>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface Lazy<T>
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class Context
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
context(Int, String)
|
||||
fun foo(): Int {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface NumberOperations {
|
||||
fun Number.plus(other: Number): Number
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
class A<T>(val a: T)
|
||||
class B(val b: Any)
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
context(T)
|
||||
fun <T> useContext(block: (T) -> Unit) { }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
val test1 by lazy { 42 }
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
inline class IT(val x: Int)
|
||||
|
||||
inline class InlineMutableSet(private val ms: MutableSet<IT>) : MutableSet<IT> {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
suspend fun foo() = baz<Unit>()
|
||||
suspend fun bar() = baz<Any>()
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// SKIP_KT_DUMP
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
// MODULE: a
|
||||
// FILE: a.kt
|
||||
package a
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// ISSUE: KT-47527
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun test_1(value: Any?): String? = value?.let { return "O" }
|
||||
fun test_2(value: Any?): String? = run {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// ISSUE: KT-52677
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MySerializable(val c: kotlin.reflect.KClass<*>)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun test1() {
|
||||
val x by lazy { 42 }
|
||||
|
||||
+4
-1
@@ -2,6 +2,9 @@
|
||||
// IGNORE_BACKEND_K2: ANY
|
||||
// FIR status: In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177).
|
||||
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
expect enum class MyEnum {
|
||||
FOO,
|
||||
BAR
|
||||
@@ -11,4 +14,4 @@ actual enum class MyEnum {
|
||||
FOO,
|
||||
BAR,
|
||||
BAZ
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
val test1 = 0
|
||||
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
data class Test<T>(val x: T, val y: String = "")
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
data class Test<T>(val x: T, val y: String = "")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// IGNORE_BACKEND_K2: ANY
|
||||
// accessing uninitialized parameter is illegal in FIR
|
||||
// LANGUAGE: -ProhibitIllegalValueParameterUsageInDefaultArguments
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
fun f(
|
||||
f1: () -> String = { f2() },
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
|
||||
val test1 = unresolved
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun <R : Number> Number.convert(): R = TODO()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun test() {
|
||||
val x = intArrayOf(1, 2, 3)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun foo(): IntArray = intArrayOf(1, 2, 3)
|
||||
fun bar() = 42
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
|
||||
fun test1() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// LANGUAGE: +BreakContinueInInlineLambdas
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
// WITH_STDLIB
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
fun test1(c: Boolean?) {
|
||||
L@ while (true) {
|
||||
L2@while (c ?: break)
|
||||
@@ -32,4 +35,4 @@ fun test5() {
|
||||
} while (if (j >= 3) false else break) // break@Inner
|
||||
if (i == 3) break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +AllowBreakAndContinueInsideWhen
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun testBreakFor() {
|
||||
val xs = IntArray(10) { i -> i }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SKIP_KT_DUMP
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class ObjectAssert<ACTUAL> {
|
||||
fun describedAs(description: String?, vararg args: Any?): ObjectAssert<ACTUAL>? = null
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun test(f: () -> Unit) =
|
||||
try { f() } catch (e: Exception) { throw e }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class X {
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class MyEnum {
|
||||
Z {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class A { V1 }
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun testEmpty(ss: List<String>) {
|
||||
for (s in ss);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
object FiveTimes
|
||||
|
||||
|
||||
+3
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
fun testSimple() = Box<Long>(2L * 3)
|
||||
|
||||
inline fun <reified T> testArray(n: Int, crossinline block: () -> T): Array<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
var p: Int = 0
|
||||
val arr = intArrayOf(1, 2, 3)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface X {
|
||||
val xs: MutableList<Any>
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun <T> magic(): T = throw Exception()
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun a() = "string"
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// ISSUE: KT-48708
|
||||
|
||||
fun test(b: Boolean) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// ISSUE: KT-48806
|
||||
|
||||
class A {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// SKIP_KT_DUMP
|
||||
|
||||
class A {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
object A
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// IGNORE_BACKEND_K2: ANY
|
||||
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
|
||||
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
val test1: Long = 42
|
||||
val test2: Short = 42
|
||||
val test3: Byte = 42
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class Ref(var value: Int)
|
||||
|
||||
interface IHost {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !LANGUAGE: +ImplicitSignedToUnsignedIntegerConversion
|
||||
|
||||
// FILE: signedToUnsignedConversions_annotation.kt
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun expectsString(s: String) {}
|
||||
fun expectsInt(i: Int) {}
|
||||
|
||||
@@ -5,7 +5,7 @@ fun useSuspendVararg(vararg sfn: suspend () -> Unit) {}
|
||||
|
||||
fun testSuspendConversionInVarargElementsSome(
|
||||
f1: () -> Unit,
|
||||
sf2: suspend () -> Unit
|
||||
sf2: suspend () -> Unit,
|
||||
f3: () -> Unit,
|
||||
) {
|
||||
useSuspendVararg(f1, sf2, f3)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
val n: Any? = null
|
||||
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
fun test1() {
|
||||
throw Throwable()
|
||||
}
|
||||
@@ -6,4 +9,4 @@ fun testImplicitCast(a: Any) {
|
||||
if (a is Throwable) {
|
||||
throw a
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun test1() {
|
||||
try {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// WITH_STDLIB
|
||||
|
||||
val testSimpleUIntLiteral = 1u
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class Enum { A }
|
||||
object A
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun testScalar(a: Any): IntArray {
|
||||
if (a !is Int) return intArrayOf()
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
object A
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun run(block: () -> Unit) {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class En { A, B, C }
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
sealed class ArrayMap<T : Any> : Iterable<T> {
|
||||
abstract val size: Int
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface IrType
|
||||
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
// MODULE: m1
|
||||
// FILE: BaseFirBuilder.kt
|
||||
|
||||
@@ -12,4 +15,4 @@ abstract class BaseFirBuilder<T> {
|
||||
|
||||
open class BaseConverter : BaseFirBuilder<Any>()
|
||||
|
||||
class DeclarationsConverter : BaseConverter()
|
||||
class DeclarationsConverter : BaseConverter()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// SKIP_KLIB_TEST
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
// FILE: Collector.java
|
||||
|
||||
public class Collector {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface SymbolOwner<E : SymbolOwner<E>>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun foo(s: String?): String {
|
||||
s?.let { it ->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface SimpleTypeMarker
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
class Flaf(val javaName: String) {
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
fun main() {
|
||||
val (a: Any, _) = 1 to 2
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// KT-50774
|
||||
class Wrapper(var baseUrl: String)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class SettingType<out V : Any>(
|
||||
)
|
||||
|
||||
class SettingReference<V : Any, T : SettingType<V>>(
|
||||
var t : T
|
||||
var t : T,
|
||||
var v : V
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
interface Something
|
||||
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
// SKIP_KLIB_TEST
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_REFLECT
|
||||
// FULL_JDK
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
enum class EE(val myName: String = this.toString().lowercase()) {
|
||||
ENTRY;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
abstract class Visibility(val name: String, val isPublicAPI: Boolean) {
|
||||
open val internalDisplayName: String
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
FILE fqName:<root> fileName:/dynamicArrayAssignment.kt
|
||||
FUN name:testArrayAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:d index:0 type:dynamic
|
||||
BLOCK_BODY
|
||||
DYN_OP operator=EQ type=dynamic
|
||||
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
|
||||
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAssignment' type=dynamic origin=null
|
||||
0: CONST String type=kotlin.String value="KEY"
|
||||
0: CONST Int type=kotlin.Int value=1
|
||||
FUN name:testArrayAssignmentFake visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:d index:0 type:dynamic
|
||||
BLOCK_BODY
|
||||
DYN_OP operator=INVOKE type=dynamic
|
||||
receiver: DYN_MEMBER memberName='set' type=dynamic
|
||||
GET_VAR 'd: dynamic declared in <root>.testArrayAssignmentFake' type=dynamic origin=null
|
||||
0: CONST String type=kotlin.String value="KEY"
|
||||
1: CONST Int type=kotlin.Int value=2
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user