[test] Mute failing irText tests
This commit is contained in:
committed by
Space Team
parent
7dba138da6
commit
b57f436a44
+3
-1
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class C(x: Int, val y: Int, var z: Int = 1) {
|
||||
constructor() : this(0, 0, 0) {}
|
||||
@@ -39,4 +41,4 @@ class C(x: Int, val y: Int, var z: Int = 1) {
|
||||
}
|
||||
|
||||
companion object
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class TestClass
|
||||
|
||||
interface TestInterface
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class TestEnum1 {
|
||||
TEST1, TEST2
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
enum class TestFinalEnum1 {
|
||||
X1
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
enum class A {
|
||||
X("asd"),
|
||||
Y() {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class Test0(val x: Int) {
|
||||
ZERO;
|
||||
@@ -23,4 +25,4 @@ enum class Test2(val x: Int) {
|
||||
};
|
||||
constructor() : this(0)
|
||||
abstract fun foo()
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class Test1 {
|
||||
init {
|
||||
@@ -43,4 +45,4 @@ class Test5 {
|
||||
println("2")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
class TestInitValInLambdaCalledOnce {
|
||||
val x: Int
|
||||
init {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface IFoo {
|
||||
fun foo()
|
||||
@@ -28,4 +30,4 @@ fun Outer.test4() =
|
||||
override fun foo() {
|
||||
println("foo")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
annotation class TestAnn(val x: String)
|
||||
|
||||
@TestAnn("class")
|
||||
@@ -18,4 +21,4 @@ class Host {
|
||||
enum class TestEnum
|
||||
|
||||
@TestAnn("annotation")
|
||||
annotation class TestAnnotation
|
||||
annotation class TestAnnotation
|
||||
|
||||
Vendored
+4
-1
@@ -1,7 +1,10 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
const val ONE = 1
|
||||
|
||||
annotation class A(val x: Int)
|
||||
|
||||
@A(ONE) fun test1() {}
|
||||
@A(1+1) fun test2() {}
|
||||
@A(1+1) fun test2() {}
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
annotation class Ann
|
||||
|
||||
@delegate:Ann
|
||||
val test1 by lazy { 42 }
|
||||
val test1 by lazy { 42 }
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
annotation class TestAnn(val x: String)
|
||||
|
||||
enum class TestEnum {
|
||||
@@ -5,4 +8,4 @@ enum class TestEnum {
|
||||
@TestAnn("ENTRY2") ENTRY2 {
|
||||
val x = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class En { A, B, C, D }
|
||||
|
||||
annotation class TestAnn(val x: En)
|
||||
|
||||
@TestAnn(En.A)
|
||||
fun test1() {}
|
||||
fun test1() {}
|
||||
|
||||
Vendored
+3
-1
@@ -1,8 +1,10 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
annotation class A(val x: String)
|
||||
|
||||
fun foo(m: Map<String, Int>) {
|
||||
@A("foo/test")
|
||||
val test by lazy { 42 }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class C {
|
||||
val test1 = 0
|
||||
@@ -18,4 +20,4 @@ class C {
|
||||
val test7 by lazy { 42 }
|
||||
|
||||
var test8 by hashMapOf<String, Int>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
const val I0 = 0
|
||||
const val I1 = 1
|
||||
const val I2 = I0 + I1 + I1
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class Outer {
|
||||
val x: Int = 1
|
||||
|
||||
Vendored
+2
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class O(val o: String)
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class C {
|
||||
val c = 42
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class Param
|
||||
class C {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface Lazy<T>
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class Context
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
context(Int, String)
|
||||
fun foo(): Int {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface NumberOperations {
|
||||
fun Number.plus(other: Number): Number
|
||||
@@ -13,4 +15,4 @@ context(NumberOperations) fun Matrix.plus(other: Matrix): Matrix = TODO()
|
||||
fun NumberOperations.plusMatrix(m1: Matrix, m2: Matrix) {
|
||||
m1.plus(m2)
|
||||
m2.plus(m1)
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
context(T)
|
||||
fun <T> useContext(block: (T) -> Unit) { }
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
val test1 by lazy { 42 }
|
||||
|
||||
@@ -7,4 +9,4 @@ class C(val map: MutableMap<String, Any>) {
|
||||
var test3 by map
|
||||
}
|
||||
|
||||
var test4 by hashMapOf<String, Any>()
|
||||
var test4 by hashMapOf<String, Any>()
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
suspend fun foo() = baz<Unit>()
|
||||
suspend fun bar() = baz<Any>()
|
||||
suspend fun <T> baz(): T {
|
||||
TODO()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// ISSUE: KT-47527
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test_1(value: Any?): String? = value?.let { return "O" }
|
||||
fun test_2(value: Any?): String? = run {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// ISSUE: KT-52677
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MySerializable(val c: kotlin.reflect.KClass<*>)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test1() {
|
||||
val x by lazy { 42 }
|
||||
@@ -10,4 +12,4 @@ fun test2() {
|
||||
x = 0
|
||||
x++
|
||||
x += 1
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
|
||||
expect abstract class A protected constructor() {
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// IGNORE_BACKEND_K1: ANY
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
@@ -15,4 +17,4 @@ actual enum class MyEnum {
|
||||
FOO,
|
||||
BAR,
|
||||
BAZ
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,8 +1,10 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
|
||||
expect sealed class Ops()
|
||||
expect class Add() : Ops
|
||||
|
||||
actual sealed class Ops actual constructor()
|
||||
actual class Add actual constructor() : Ops()
|
||||
actual class Add actual constructor() : Ops()
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
val test1 = 0
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
|
||||
val test1 = unresolved
|
||||
@@ -8,4 +10,4 @@ val test2: Unresolved =
|
||||
|
||||
val test3 = 42.unresolved(56)
|
||||
|
||||
val test4 = 42 *
|
||||
val test4 = 42 *
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// SKIP_KLIB_TEST
|
||||
// Related to KT-49507
|
||||
// FILE: A.java
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun <R : Number> Number.convert(): R = TODO()
|
||||
|
||||
fun foo(arg: Number) {
|
||||
@@ -7,4 +10,4 @@ fun foo(arg: Number) {
|
||||
fun main(args: Array<String>) {
|
||||
val x: Int = 0
|
||||
foo(x.convert())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test() {
|
||||
val x = intArrayOf(1, 2, 3)
|
||||
x[1] = 0
|
||||
@@ -7,4 +10,4 @@ fun foo() = 1
|
||||
|
||||
fun test2() {
|
||||
intArrayOf(1, 2, 3)[foo()] = 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun foo(): IntArray = intArrayOf(1, 2, 3)
|
||||
fun bar() = 42
|
||||
|
||||
@@ -14,4 +17,4 @@ fun testCall() {
|
||||
|
||||
fun testMember(c: C) {
|
||||
c.x[0]++
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
|
||||
fun test1() {
|
||||
@@ -25,4 +27,4 @@ fun test3() {
|
||||
fun test4() {
|
||||
while (break) {}
|
||||
while (continue) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// LANGUAGE: +BreakContinueInInlineLambdas
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
// WITH_STDLIB
|
||||
|
||||
@@ -115,4 +117,4 @@ fun test8() {
|
||||
while (true) {
|
||||
baz({break})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// !LANGUAGE: +AllowBreakAndContinueInsideWhen
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun testBreakFor() {
|
||||
val xs = IntArray(10) { i -> i }
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// SKIP_KT_DUMP
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class ObjectAssert<ACTUAL> {
|
||||
fun describedAs(description: String?, vararg args: Any?): ObjectAssert<ACTUAL>? = null
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test(f: () -> Unit) =
|
||||
try { f() } catch (e: Exception) { throw e }
|
||||
try { f() } catch (e: Exception) { throw e }
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class X {
|
||||
|
||||
B {
|
||||
@@ -10,4 +13,4 @@ enum class X {
|
||||
|
||||
fun box(): String {
|
||||
return X.B.value()
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class MyEnum {
|
||||
Z {
|
||||
var counter = 0
|
||||
@@ -25,4 +28,4 @@ enum class MyEnum {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class A { V1 }
|
||||
|
||||
fun testVariableAssignment_throws(a: A) {
|
||||
@@ -76,4 +79,4 @@ fun testLambdaResultExpression_throws(a: A) {
|
||||
// else -> throw
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun testEmpty(ss: List<String>) {
|
||||
for (s in ss);
|
||||
@@ -19,4 +21,4 @@ fun testDestructuring(pp: List<Pair<Int, String>>) {
|
||||
|
||||
fun testRange() {
|
||||
for (i in 1..10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
object FiveTimes
|
||||
|
||||
@@ -14,4 +16,4 @@ fun IReceiver.test() {
|
||||
for (i in FiveTimes) {
|
||||
println(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
var p: Int = 0
|
||||
val arr = intArrayOf(1, 2, 3)
|
||||
|
||||
@@ -45,6 +48,7 @@ fun testArrayPostfix() {
|
||||
val a2 = arr[0]--
|
||||
}
|
||||
|
||||
|
||||
fun testClassPropPrefix() {
|
||||
val p1 = ++C().p
|
||||
val p2 = --C().p
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
inline fun foo() = false
|
||||
|
||||
fun run(x: Boolean, y: Boolean): String {
|
||||
@@ -15,4 +17,4 @@ fun run(x: Boolean, y: Boolean): String {
|
||||
|
||||
fun box(): String {
|
||||
return run(true, true)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface X {
|
||||
val xs: MutableList<Any>
|
||||
@@ -28,4 +30,4 @@ abstract class AML : MutableList<Int> {
|
||||
this@AML += 300
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun <T> magic(): T = throw Exception()
|
||||
|
||||
fun <T> test(value: T, value2: T) {
|
||||
@@ -8,4 +11,4 @@ fun <T> test(value: T, value2: T) {
|
||||
val x5: Any = magic() ?: 42
|
||||
val x6: Any = value ?: magic() ?: 42
|
||||
val x7: Any = magic() ?: value ?: 42
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,4 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun a() = "string"
|
||||
|
||||
class A {
|
||||
@@ -8,4 +11,4 @@ class A {
|
||||
b = this
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
|
||||
// SKIP_KT_DUMP
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// !LANGUAGE: -ProhibitJvmFieldOnOverrideFromInterfaceInPrimaryConstructor
|
||||
// SKIP_KT_DUMP
|
||||
// SKIP_KLIB_TEST
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
interface A { val x: Int }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// ISSUE: KT-48708
|
||||
|
||||
fun test(b: Boolean) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// ISSUE: KT-48806
|
||||
|
||||
class A {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// SKIP_KT_DUMP
|
||||
|
||||
class A {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
object A
|
||||
|
||||
enum class En { X }
|
||||
@@ -6,4 +9,4 @@ operator fun A.invoke(i: Int) = i
|
||||
operator fun En.invoke(i: Int) = i
|
||||
|
||||
val test1 = A(42)
|
||||
val test2 = En.X(42)
|
||||
val test2 = En.X(42)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// !LANGUAGE: +ImplicitSignedToUnsignedIntegerConversion
|
||||
|
||||
// FILE: signedToUnsignedConversions_annotation.kt
|
||||
@@ -53,4 +55,4 @@ fun test() {
|
||||
|
||||
// such kind of conversions (Int <-> Long) actually are not supported
|
||||
// takeLong(IMPLICIT_INT)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun expectsString(s: String) {}
|
||||
fun expectsInt(i: Int) {}
|
||||
@@ -23,4 +25,4 @@ fun test2(x: Any): String {
|
||||
fun test3(x: Any): String {
|
||||
if (x !is String) return ""
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
val n: Any? = null
|
||||
|
||||
enum class En(val x: String?) {
|
||||
ENTRY(n?.toString())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test1() {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// WITH_STDLIB
|
||||
|
||||
val testSimpleUIntLiteral = 1u
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class Enum { A }
|
||||
object A
|
||||
val a = 0
|
||||
@@ -8,4 +11,4 @@ class Z {
|
||||
fun test1() = Enum.A
|
||||
fun test2() = A
|
||||
fun test3() = a
|
||||
fun test4() = Z
|
||||
fun test4() = Z
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun testScalar(a: Any): IntArray {
|
||||
if (a !is Int) return intArrayOf()
|
||||
@@ -8,4 +10,4 @@ fun testScalar(a: Any): IntArray {
|
||||
fun testSpread(a: Any): IntArray {
|
||||
if (a !is IntArray) return intArrayOf()
|
||||
return intArrayOf(*a)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
object A
|
||||
|
||||
@@ -28,4 +30,4 @@ fun testComma(x: Int) =
|
||||
5, 6, 7 -> "567"
|
||||
8, 9 -> "89"
|
||||
else -> "?"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun run(block: () -> Unit) {}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class En { A, B, C }
|
||||
|
||||
fun test() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
class MyMap<K : Any, V : Any> : AbstractMutableMap<K, V>() {
|
||||
override fun put(key: K, value: V): V? = null
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// FULL_JDK
|
||||
// SKIP_KLIB_TEST
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
class A1 : java.util.ArrayList<String>()
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
sealed class ArrayMap<T : Any> : Iterable<T> {
|
||||
abstract val size: Int
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface IrType
|
||||
|
||||
@@ -42,4 +44,4 @@ inline fun <T> TypeRemapper.withinScope(irTypeParametersContainer: IrTypeParamet
|
||||
val result = fn()
|
||||
leaveScope()
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// SKIP_KLIB_TEST
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// FILE: Collector.java
|
||||
|
||||
public class Collector {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface SymbolOwner<E : SymbolOwner<E>>
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun foo(s: String?): String {
|
||||
s?.let { it ->
|
||||
@@ -22,4 +24,4 @@ val String?.baz: String
|
||||
return it
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface SimpleTypeMarker
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// SKIP_KLIB_TEST
|
||||
// FIR_IDENTICAL
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
import java.util.Date
|
||||
|
||||
val unitFun = { }
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
class Flaf(val javaName: String) {
|
||||
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
open class ControlFlowInfo<K, V>(val map: Map<K, V>): Map<K, V> by map
|
||||
|
||||
@@ -7,4 +9,4 @@ class StringFlowInfo(map: Map<String, String>): ControlFlowInfo<String, String>(
|
||||
keys
|
||||
info.keys
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun main() {
|
||||
val (a: Any, _) = 1 to 2
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// KT-50774
|
||||
class Wrapper(var baseUrl: String)
|
||||
|
||||
@@ -11,4 +13,4 @@ enum class ConfigurationParameter {
|
||||
);
|
||||
|
||||
constructor(apply: (String, Wrapper) -> Unit) {}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface Something
|
||||
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
// SKIP_KLIB_TEST
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
// WITH_REFLECT
|
||||
// FULL_JDK
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class EE(val myName: String = this.toString().lowercase()) {
|
||||
ENTRY;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
abstract class Visibility(val name: String, val isPublicAPI: Boolean) {
|
||||
open val internalDisplayName: String
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// FIR_IDENTICAL
|
||||
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun testArrayIncrementDecrement(d: dynamic) {
|
||||
val t1 = ++d["prefixIncr"]
|
||||
val t2 = --d["prefixDecr"]
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
// FIR_IDENTICAL
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
val anonymous = fun() { println() }
|
||||
val anonymous = fun() { println() }
|
||||
|
||||
+4
-1
@@ -1,2 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
fun test1() = "42".run { length }
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test1() = "42".run { length }
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
object A
|
||||
object B
|
||||
|
||||
@@ -17,4 +20,4 @@ fun test(fooImpl: IFoo, invokeImpl: IInvoke) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
fun test0() {
|
||||
run {
|
||||
@@ -41,4 +43,4 @@ fun testLrmFoo2(ints: List<Int>) {
|
||||
if (it == 0) return@forEach
|
||||
print(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
interface CPointed
|
||||
|
||||
inline fun <reified T : CPointed> CPointed.reinterpret(): T = TODO()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_KT_DUMP
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.contract
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
fun <X, Y> foo(): (X) -> Y = TODO()
|
||||
|
||||
interface Inv2<A, B>
|
||||
@@ -11,4 +13,4 @@ fun box(): String {
|
||||
val x: Inv2<String, Int> = test()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
enum class Z {
|
||||
ENTRY {
|
||||
fun test() {}
|
||||
@@ -8,4 +11,4 @@ enum class Z {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
fun <K1, V1> Map<out K1, V1>.plus(pair: Pair<K1, V1>): Map<K1, V1> =
|
||||
if (this.isEmpty()) mapOf(pair) else LinkedHashMap(this).apply { put(pair.first, pair.second) }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// DUMP_EXTERNAL_CLASS: kotlin/Int
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR_ES6
|
||||
|
||||
val test = Int.MIN_VALUE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user