[test] Run irText tests against K1 frontend for JS

This commit is contained in:
Sergej Jaskiewicz
2023-03-14 20:20:53 +01:00
committed by Space Team
parent 502a0b7e10
commit 27ccef868a
135 changed files with 6607 additions and 697 deletions
@@ -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
@@ -1,5 +1,7 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
// IGNORE_BACKEND_K1: JS_IR
// IGNORE_BACKEND_K1: JS_IR_ES6
class Context {
fun foo() = 1
@@ -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
@@ -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 {
@@ -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>
@@ -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
@@ -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)
@@ -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) { }